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

Function internalCalculateFunctionals

kernel/fglm/fglmzero.cc:608–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606}
607
608void
609internalCalculateFunctionals( const ideal /*& theIdeal*/, idealFunctionals & l,
610 fglmSdata & data )
611{
612
613 // insert pOne() into basis and update the workingList:
614 poly one = pOne();
615 data.newBasisElem( one );
616 data.updateCandidates();
617
618 STICKYPROT(".");
619 while ( data.candidatesLeft() == TRUE ) {
620 fglmSelem candidate = data.nextCandidate();
621 if ( candidate.isBasisOrEdge() == TRUE ) {
622 int edge = data.getEdgeNumber( candidate.monom );
623 if ( edge != 0 )
624 {
625 // now candidate is an edge, i.e. we know its normalform:
626 // NF(p) = - ( tail(p)/LC(p) )
627 poly nf = data.getSpanPoly( edge );
628 pNorm( nf );
629 pLmDelete(&nf); //. deletes the leadingmonomial
630 nf= pNeg( nf );
631 fglmVector nfv = data.getVectorRep( nf );
632 l.insertCols( candidate.divisors, nfv );
633 data.newBorderElem( candidate.monom, nfv );
634 pDelete( &nf );
635 STICKYPROT( "+" );
636 }
637 else
638 {
639 int basis= data.newBasisElem( candidate.monom );
640 data.updateCandidates();
641 l.insertCols( candidate.divisors, basis );
642 STICKYPROT( "." );
643 }
644 }
645 else {
646 int var = 0;
647 fglmVector temp = data.getBorderDiv( candidate.monom, var );
648 fglmASSERT( var > 0, "this should never happen" );
649 fglmVector nfv = l.addCols( var, data.getBasisSize(), temp );
650 data.newBorderElem( candidate.monom, nfv );
651 l.insertCols( candidate.divisors, nfv );
652 STICKYPROT( "-" );
653 }
654 candidate.cleanup();
655 } //. while ( data.candidatesLeft() == TRUE )
656 l.endofConstruction();
657 STICKYPROT2( "\nvdim= %i\n", data.getBasisSize() );
658 return;
659}
660
661// Calculates the defining Functionals for the ideal "theIdeal" and
662// returns them in "l".

Callers 1

CalculateFunctionalsFunction · 0.85

Calls 15

pNormFunction · 0.85
newBasisElemMethod · 0.80
updateCandidatesMethod · 0.80
nextCandidateMethod · 0.80
getEdgeNumberMethod · 0.80
getSpanPolyMethod · 0.80
getVectorRepMethod · 0.80
insertColsMethod · 0.80
newBorderElemMethod · 0.80
getBorderDivMethod · 0.80
addColsMethod · 0.80
cleanupMethod · 0.80

Tested by

no test coverage detected