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

◆ check_var()

bool check_var ( int v,
int e )
static

Definition at line 15 of file ExponentList.cpp.

16{
17 if (v < 0 || v > MAX_VAR)
18 {
19 ERROR("Monomial expects variable number in range 0..%d", MAX_VAR);
20 return false;
21 }
22 if (e < MIN_EXP || e > MAX_EXP || e == 0)
23 {
24 ERROR("Monomial expects non-zero exponents in range %d..%d",
25 MIN_EXP,
26 MAX_EXP);
27 return false;
28 }
29 return true;
30}
#define MIN_EXP
#define MAX_EXP
#define MAX_VAR
const int ERROR
Definition m2-mem.cpp:55

References ERROR, MAX_EXP, MAX_VAR, and MIN_EXP.

Referenced by ExponentList< int, true >::from_arrayint().