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

◆ basis0()

void NCBasis::basis0 ( )
private

Definition at line 127 of file matrix-ncbasis.cpp.

128{
129 if (system_interrupted()) return;
130
131 // order of events:
132 // 1. check if the degree is greater than hi_degree. If so, exit.
133 // 2. check if a suffix of the current word is a pattern in the WordTable. If so, exit.
134 // 3. if the degree is >= lo_degree, then call insert.
135 // 4. if the degree is equal to hi_degree, then exit (no recursion necessary)
136 // 5. for each variable, append the variable to the state monomial, and make recursive call.
137
138 Word tmpWord(mMonomial.data(),mMonomial.data() + mCurrentIndex + 1);
139 int notUsed;
140
141 if (mHiHeft != -1 and mCurrentHeftValue > mHiHeft) return;
142
143 if (mWordTable->isSuffix(tmpWord,notUsed)) return;
144
146
147 if (mHiHeft != -1 and mCurrentHeftValue == mHiHeft) return;
148
149 // this ensures that we do not move past allocated memory in the loop below
150 if (mMonomial.size() <= mCurrentIndex + 1) mMonomial.push_back(0);
151
153 for (int i = 0; i < mVariables.size(); ++i)
154 {
157
158 basis0();
159
161
162 if (mLimit == 0) return;
163 }
165}
std::vector< int > mMonomial
std::vector< int > mVariables
std::vector< int > mVariableHefts
int mCurrentHeftValue
std::unique_ptr< WordTable > mWordTable
bool system_interrupted()

References basis0(), insert(), mCurrentHeftValue, mCurrentIndex, mHiHeft, mLimit, mLoHeft, mMonomial, mVariableHefts, mVariables, mWordTable, and system_interrupted().

Referenced by basis0(), and compute().