The name QBGenerator
derives from its intended use as a
quotient basis generator, that is a way of generating a factor closed
(vector space) basis of power products for the quotient of a
polynomial ring by a zero-dimensional ideal. It is used in the
implementation of the FGLM and the Buchberger-Moeller algorithms -- in
fact these are really the same algorithm (for computing a Groebner
basis of an intersection of one or more zero-dimensional ideals).
Let P
denote a polynomial ring
(with coefficients in a field
k), and let I
be a zero-dimensional ideal
in P. Then
mathematically the quotient P/I is a finite dimensional vector space
over k. We seek a basis QB
for P/I which is a factor closed
set of power products; i.e. if the power product t is in QB then any
factor of t is in QB too. Groebner basis theory guarantees that such
bases exist; actually it was first proved by Macaulay (a person, not a
computer algebra system).
The elements of QB
are determined one at a time, obviously
starting with the trivial power product, 1. Moreover, at every stage
the set of elements in the partially formed QB
is factor closed,
and this implies that only certain PPs are candidates for being
adjoined to the QB
(we call these corners). When a new
element is adjoined to the QB
new elements may appear in the
corner set, these newly adjoined elements form the new corner set
(this is always a subset of the corner set, and may be empty).
During the determination of the QB
, some power products will be
discovered which cannot be in the QB
(usually based on a linear
independence criterion). Such PPs form the avoid set: the
QBGenerator
will exclude all multiples of all elements of the
avoid set from subsequent consideration.
Oh come on! Be reasonable! It's hot and humid here, I'm going on holiday tomorrow, and I can't remember what the code does. Nothing terribly fancy, I'm sure.
myCornerPPIntoQB
is definitely NOT EXCEPTION SAFE :-(
How can I fix this without incurring excessive run-time overhead???
Maybe using splice
instead of push_back
would do the trick?
Might want to move declaration of it1
in
myCornerPPIntoAvoidSet
to before the call to push_back
to be
extra sure about exception safety.
Class QBGenerator
could offer a ctor which accepts a (good)
estimate of the dimension of the quotient, i.e. final number of
elements in the QB. It could use this value to reserve
space for
myQBList
.
How the blazes can I describe comprehensibly what QBGenerator does??
Documentation is incomplete.