In CoCoALib factorization
is a template class with all fields public.
Its purpose is to represent a (partial) factorization. The only operations
for a factorization
are the constructor and operator<<
for printing.
A factorization
contains three fields
myFactors
contains a list of factors found (may be empty)
myExponents
contains a list of exponents (of type long
), one for each factor found
myRemainingFactor
contains a remaining factor (which may be just a unit)
In CoCoALib there are just two instantiations of this template:
factorization<BigInt>
for the fns factor
and SmoothFactor
in NumTheory
factorization<RingElem>
for the fns factor
and SqfreeFactor
and ContentFreeFactor
in PolyRing
(actually TmpFactor
)
The exact characteristics of the factors found depend on the function which
generated the factorization
.
Short and simple! It's all in the header file.
It would be safer to have pairs of factor-and-multiplicity rather than two separate vectors whose length must be the same. However it may be less convenient for the user.
Which name is better multiplicity
or exponent
?
2012