Macaulay2 Engine
Loading...
Searching...
No Matches
coeffrings.cpp
Go to the documentation of this file.
1#include "coeffrings.hpp"
2
5 bool p_one,
6 bool p_plus,
7 bool p_parens) const
8{
9 (void) p_parens;
10 long n = coerceToLongInteger(a);
11 if (n < 0)
12 {
13 o << '-';
14 n = -n;
15 }
16 else if (p_plus)
17 o << '+';
18 if (p_one || n != 1) o << n;
19}
20
23 bool p_one,
24 bool p_plus,
25 bool p_parens) const
26{
27 return R->elem_text_out(o, a, p_one, p_plus, p_parens);
28}
29
30// Local Variables:
31// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
32// indent-tabs-mode: nil
33// End:
void elem_text_out(buffer &o, ElementType a, bool p_one=true, bool p_plus=false, bool p_parens=false) const
const Ring * R
void elem_text_out(buffer &o, ElementType a, bool p_one=true, bool p_plus=false, bool p_parens=false) const
Definition coeffrings.cpp:3
long coerceToLongInteger(const elem &f) const
Two SimpleARing-style coefficient adapters: CoefficientRingZZp and CoefficientRingR.