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

◆ elem_text_out()

template<class E, bool L>
void ExponentList< E, L >::elem_text_out ( buffer & o,
ConstExponents m,
bool p_one = true )
inlinestatic

Definition at line 83 of file ExponentList.hpp.

84 {
85 Iterator i = m;
86 if (!i.valid() and p_one) o << "1";
87 for (; i.valid(); ++i)
88 {
89 Exponent v = i.var();
90 Exponent e = i.exponent();
91 if (v < 26)
92 o << char('a' + v);
93 else if (v < 52)
94 o << char('A' + v - 26);
95 else
96 o << "x[" << v << "]";
97 if (e > 1)
98 o << e;
99 else if (e < 0)
100 o << "^(" << e << ")";
101 }
102 }
ExponentListIterator< E, L > Iterator
static void var(Exponent v, Exponent e, Vector &result)