MCPcopy Create free account
hub / github.com/Singular/Singular / newBorderElem

Method newBorderElem

kernel/fglm/fglmzero.cc:440–464  ·  view source on GitHub ↗

Inserts poly p and fglmvector v without copying into border, reAllocs Memory if necessary, and increases borderSize. Remember: The poly of border is deleted via ~borderElem in ~fglmSdata! Sets m= NULL to indicate that now border is ow(e?)ing the poly.

Source from the content-addressed store, hash-verified

438// Remember: The poly of border is deleted via ~borderElem in ~fglmSdata!
439// Sets m= NULL to indicate that now border is ow(e?)ing the poly.
440void
441fglmSdata::newBorderElem( poly & m, fglmVector v )
442{
443 borderSize++;
444 if ( borderSize == borderMax ) {
445#ifndef HAVE_EXPLICIT_CONSTR
446 borderElem * tempborder = new borderElem[ borderMax+borderBS ];
447 for ( int k = 0; k < borderMax; k++ ) {
448 tempborder[k]= border[k];
449 border[k].insertElem( NULL, fglmVector() );
450 }
451 delete [] border;
452 border= tempborder;
453#else
454 border= (borderElem *)omReallocSize( border, borderMax*sizeof( borderElem ), (borderMax + borderBS)*sizeof( borderElem ) );
455#endif
456 borderMax+= borderBS;
457 }
458#ifndef HAVE_EXPLICIT_CONSTR
459 border[borderSize].insertElem( m, v );
460#else
461 border[borderSize].borderElem( m, v );
462#endif
463 m= NULL;
464}
465
466fglmSelem
467fglmSdata::nextCandidate()

Callers 1

Calls 3

fglmVectorClass · 0.85
borderElemMethod · 0.80
insertElemMethod · 0.45

Tested by

no test coverage detected