Definition at line 233 of file FreeMonoid.cpp.
239{
240 auto start =
result.size();
244 for (auto j = word_length-1; j >= 0; --j)
245 {
246 int curvar = word_ptr[j];
247 int curvarPower = 0;
249 while ((j >= 0) && (word_ptr[j] == curvar))
250 {
251 --j;
252 curvarPower++;
253 }
254 result.push_back(curvarPower);
255
256 j++;
257 }
258 result[start] =
static_cast<int>(
result.size() - start);
259}
int wordLength(const Monom &m) const
VALGRIND_MAKE_MEM_DEFINED & result(result)
References mNumWeights, result(), and wordLength().
Referenced by FreeAlgebra::eval(), and M2FreeAlgebra::list_form().