Macaulay2 Engine
Loading...
Searching...
No Matches
◆
compare()
template<class E,
bool
L>
int
ExponentList
< E, L >::compare
(
ConstExponents
a
,
ConstExponents
b
)
inline
static
Definition at line
145
of file
ExponentList.hpp
.
146
{
147
Exponent
alen
=
length
(
a
++) - 1;
148
Exponent
blen
=
length
(
b
++) - 1;
149
// TODO: try using std::lexicographical_compare?
150
for
(
size_t
i
= 0;
i
<
std::min
(
alen
,
blen
);
i
++)
151
{
152
Exponent
c
= *
a
++ - *
b
++;
153
if
(
c
== 0)
continue
;
154
return
(
c
> 0 ?
GT
:
LT
);
155
}
156
if
(
alen
==
blen
)
return
EQ
;
157
return
(
alen
>
blen
?
GT
:
LT
);
158
}
ExponentList::Exponent
E Exponent
Definition
ExponentList.hpp:69
ExponentList::length
static const Exponent length(ConstExponents m)
Definition
ExponentList.hpp:104
ExponentList
Definition
ExponentList.hpp:64
ExponentList
Generated on
for Macaulay2 Engine by
1.15.0