30 void deform(
Ideal& ideal,
31 vector<Exponent>& undeform,
33 bool stronglyGeneric) {
36 map<Exponent, vector<Exponent*> > exps;
43 exps[e].push_back(*it);
47 undeform.push_back(0);
48 for (map<
Exponent, vector<Exponent*> >::iterator it = exps.begin();
49 it != exps.end(); ++it) {
50 vector<Exponent*>& block = it->second;
52 typedef vector<Exponent*>::iterator BlockIt;
53 if (stronglyGeneric) {
54 for (BlockIt blockIt = block.begin(); blockIt != block.end();
56 undeform.push_back((*blockIt)[var]);
57 (*blockIt)[var] = undeform.size() - 1;
60 undeform.push_back(block.front()[var]);
61 Exponent sharedDeformedExponent = undeform.size() - 1;
63 for (BlockIt blockIt = block.begin(); blockIt != block.end();
65 bool canUseShared =
true;
66 for (BlockIt other = blockIt + 1; other != block.end(); ++other) {
67 tmp.lcm(*blockIt, *other);
74 (*blockIt)[var] = sharedDeformedExponent;
76 undeform.push_back((*blockIt)[var]);
77 (*blockIt)[var] = undeform.size() - 1;
87 bool stronglyGeneric):
88 _undeform(ideal.getVarCount()) {
92 for (
size_t var = 0; var < ideal.
getVarCount(); ++var)
93 deform(ideal,
_undeform[var], var, stronglyGeneric);
102 for (
size_t var = 0; var < term.
getVarCount(); ++var) {
void order(Ideal &ideal) const
Represents a monomial ideal with int exponents.
Cont::const_iterator const_iterator
bool strictlyContains(const Exponent *term) const
const_iterator end() const
const_iterator begin() const
bool isWeaklyGeneric() const
size_t getVarCount() const
Term represents a product of variables which does not include a coefficient.
size_t getVarCount() const