Macaulay2 Engine
Loading...
Searching...
No Matches

◆ text_out()

void Monoid::text_out ( buffer & o) const

Definition at line 305 of file monoid.cpp.

306{
307 int i;
308 o << "[";
309 for (i = 0; i < mVariableCount - 1; i++) o << mVariableNames[i] << ",";
311
312 int degrk = mDegreeMonoid->n_vars();
313 o << "," << newline << " DegreeLength => " << degrk;
314
315 o << "," << newline << " Degrees => {";
316 for (i = 0; i < mVariableCount; i++)
317 {
318 if (i != 0) o << ", ";
319 if (degrk != 1) o << '{';
320 for (int j = 0; j < degrk; j++)
321 {
322 if (j != 0) o << ", ";
323 o << mDegrees[i * degrk + j];
324 }
325 if (degrk != 1) o << '}';
326 }
327 o << "}";
328
329 if (mHeftVector.size() != 0)
330 {
331 o << "," << newline << " Heft => {";
332 for (i = 0; i < mHeftVector.size(); i++)
333 {
334 if (i != 0) o << ", ";
335 o << mHeftVector[i];
336 }
337 o << "}";
338 }
339
340 if (mo_ != nullptr)
341 {
342 o << "," << newline << " ";
344 }
345
346 o << newline << " ]";
347}
const std::vector< int > mDegrees
length mVariableCount * (length of a single degree vector)
Definition monoid.hpp:103
const Monoid * mDegreeMonoid
Definition monoid.hpp:90
const int mVariableCount
number of variables
Definition monoid.hpp:99
const MonomialOrdering * mo_
the monomial ordering of the variables
Definition monoid.hpp:94
const std::vector< int > mHeftVector
length of a single degree vector
Definition monoid.hpp:105
const std::vector< std::string > mVariableNames
names of variables
Definition monoid.hpp:101
char newline[]
Definition m2-types.cpp:49
M2_string IM2_MonomialOrdering_to_string(const MonomialOrdering *mo)

References IM2_MonomialOrdering_to_string(), mDegreeMonoid, mDegrees, mHeftVector, mo_, mVariableCount, mVariableNames, and newline.

Referenced by rawMonoidToString().