81{
83 monomials::const_iterator
end =
m.end();
85
86
87 for (monomials::const_iterator it =
m.begin(); it !=
end; it++)
88 {
90 if (last == mono)
91 {
93 last = -1;
94 }
95 else
96 {
97 tmp.
m.push_back(mono);
98 last = mono;
99 }
100 }
102 monomials::iterator it = tmp.
m.begin();
103 monomials::iterator lastIt = tmp.
m.begin();
104 monomials::iterator tmpEnd = tmp.
m.end();
105 it++;
106 while (it != tmpEnd)
107 {
108 if (*lastIt == *it)
109 {
110 lastIt = tmp.
m.erase(lastIt, ++it);
112 {
113 ++it;
114 }
115 }
116 else
117 {
118 ++it;
119 ++lastIt;
120 }
121 }
122 return tmp;
123}
bool funccomp(const brMonomial &a, const brMonomial &b)
TermIterator< Nterm > end(Nterm *)