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

◆ basis0_singly_graded()

void KBasis::basis0_singly_graded ( )
private

Definition at line 310 of file matrix-kbasis.cpp.

311{
312 // insert the all zeros vector
313 if (!try_insert_sg()) return;
314 if (mVariables.size() == 0) return;
315 int curr = 0;
316 do {
317 int vcurr = mVariables[curr];
318 // increase the curr index until we reach a limit
319 do {
320 if (limit == 0 || system_interrupted()) return;
321 kb_exp[vcurr]++;
322 kb_exp_weight += var_wts[curr];
323 } while (try_insert_sg());
324 } while (backtrack(curr));
325}
std::vector< int > mVariables
bool backtrack(int &curr)
int kb_exp_weight
int * var_wts
bool try_insert_sg()
bool system_interrupted()

References backtrack(), kb_exp, kb_exp_weight, limit, mVariables, system_interrupted(), try_insert_sg(), and var_wts.

Referenced by compute().