class ReductionCogBase
ReductionCogBase
is an abstract class to perform a full reduction:
it contains two parts:
IgnoredPPs
summands whose PPs are to be ignoredActive
the part which will be reduced
Thanks to the limited operations allowed on a ReductionCog
, all PPs in
IgnoredPPs
are guaranteed bigger than those in the Active
part.
With a ReductionCog
F
you can compute:
ActiveLPP(F)
the LPP of theActive
partIsActiveZero(F)
is theActive
part zero?F.myMoveToNextLM()
move theLM
of theActive
part to theIgnoredPPs
F.myReduce(f)
reduce theActive
part withf
F.myAssignReset(f)
theActive
part getsf
;f
andIgnoredPPs
get 0F.myAssignReset(f, fLen)
same as above but faster for geobucket implementationF.myRelease(f)
F
gets the total value off
;f
gets 0F.myOutput(out)
The idea is that LM will be reduced first; if the result is not 0 it
will be "set aside and ignored" and the new LM of the Active
part will be
reduced, and so on.
The result of myReduce
is defined up to an invertible (in the
coefficient ring) constant factor.
Constructors are
ReductionCog NewRedCogPolyField(const SparsePolyRing& P); ReductionCog NewRedCogPolyGCD(const SparsePolyRing& P); ReductionCog NewRedCogGeobucketField(const SparsePolyRing& P); ReductionCog NewRedCogGeobucketGCD(const SparsePolyRing& P);
In the "GCD" version, myRelease
makes poly content free.
In the "Field" version: myRelease
does NOT make poly monic.
... I can't remember why I made this choice....
example
ReductionCog F = ChooseReductionCogGeobucket(myGRingInfoValue); F->myAssignReset(f, fLen); while ( !IsActiveZero(F) ) { (..) // find reducer g or break F->myReduce(g); } F->myRelease(f);
implementations
In general the geobucket implementation are to be preferred
RedCog::PolyFieldImpl
-
this implementation contains two
RingElem
. RedCog::PolyGCDImpl
- this implementation contains two polynomials [RingElem] two coefficients [RingElem] and a counter
RedCog::GeobucketFieldImpl
-
this implementation contains a RingElem for the
IgnoredPPs
and a geobucket for theActive
part RedCog::GeobucketGCDImpl
-
this implementation contains a RingElem for the
IgnoredPPs
and a geobucket for theActive
part two coefficients [RingElem] and a counter