Macaulay2 Engine
Loading...
Searching...
No Matches
coeffrings.cpp
Go to the documentation of this file.
1
#include "
coeffrings.hpp
"
2
3
void
CoefficientRingZZp::elem_text_out
(
buffer
&o,
4
ElementType
a,
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
21
void
CoefficientRingR::elem_text_out
(
buffer
&o,
22
ElementType
a,
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:
CoefficientRingR::elem_text_out
void elem_text_out(buffer &o, ElementType a, bool p_one=true, bool p_plus=false, bool p_parens=false) const
Definition
coeffrings.cpp:21
CoefficientRingR::R
const Ring * R
Definition
coeffrings.hpp:259
CoefficientRingR::ElementType
elem ElementType
Definition
coeffrings.hpp:264
CoefficientRingZZp::ElementType
elem ElementType
Definition
coeffrings.hpp:90
CoefficientRingZZp::elem_text_out
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
CoefficientRingZZp::coerceToLongInteger
long coerceToLongInteger(const elem &f) const
Definition
coeffrings.hpp:131
buffer
Definition
buffer.hpp:55
coeffrings.hpp
Two SimpleARing-style coefficient adapters: CoefficientRingZZp and CoefficientRingR.
Macaulay2
e
coeffrings.cpp
Generated on
for Macaulay2 Engine by
1.15.0