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

◆ reduce_exp()

int reduce_exp ( const int * m,
const int * exp )
static

Definition at line 59 of file assprime.cpp.

69{
70 int is_one = 1;
71 for (index_varpower i = m; i.valid(); ++i)
72 {
73 if (exp[i.var()] == 1) return 0;
74 if (exp[i.var()] == 0) is_one = 0;
75 }
76 if (is_one) return -1;
77 return 1;
78}
ExponentListIterator< int, true > index_varpower

Referenced by AssociatedPrimes::ass_prime_generator(), and MinimalPrimes::ass_prime_generator().