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

◆ NCF4()

NCF4::NCF4 ( const FreeAlgebra & A,
const ConstPolyList & input,
int hardDegreeLimit,
int strategy,
int numThreads )

Definition at line 19 of file NCF4.cpp.

25 : mFreeAlgebra(A),
26 mInput(input),
27 //mTopComputedDegree(-1), // not used yet.
28 //mHardDegreeLimit(hardDegreeLimit), // not used yet.
29 mMonomEq(A.monoid()),
33 mVectorArithmetic(new VectorArithmetic(A.coefficientRing())),
34 mNumThreads(mtbb::numThreads(numThreads)),
37{
38 // std::cout << "number of processors being used: " << mNumThreads << std::endl;
39 (void) hardDegreeLimit;
40 (void) strategy;
41 if (M2_gbTrace >= 1)
42 {
43 buffer o;
44 o << "[NCGB F4]";
45 emit_wrapped(o.str());
46 }
47
48 // process input polynomials
49 mIsGraded = true;
50 for (int i = 0; i < mInput.size(); ++i)
51 {
52 auto d = freeAlgebra().heft_degree(*mInput[i]);
53 if (not d.second)
54 mIsGraded = false;
55 mOverlapTable.insert(d.first,
56 true,
57 std::make_tuple(i,-1,-1,true));
58 }
59 if (M2_gbTrace >= 1)
60 {
61 buffer o;
62 o << (mIsGraded ? " homogeneous " : " inhomogeneous ");
63 emit_wrapped(o.str());
64 }
65}
const Ring * coefficientRing() const
std::pair< int, bool > heft_degree(const Poly &f) const
const FreeMonoid & monoid() const
MonomEq mMonomEq
Definition NCF4.hpp:231
bool mIsGraded
Definition NCF4.hpp:224
MonomHash mMonomHash
Definition NCF4.hpp:233
const ConstPolyList mInput
Definition NCF4.hpp:217
MonomHashEqual mMonomHashEqual
Definition NCF4.hpp:232
MonomialHash mColumnMonomials
Definition NCF4.hpp:235
const FreeAlgebra & mFreeAlgebra
Definition NCF4.hpp:216
bool mIsParallel
Definition NCF4.hpp:253
int mNumThreads
Definition NCF4.hpp:252
const VectorArithmetic * mVectorArithmetic
Definition NCF4.hpp:250
mtbb::task_arena mScheduler
Definition NCF4.hpp:255
OverlapTable mOverlapTable
Definition NCF4.hpp:221
const FreeAlgebra & freeAlgebra() const
Definition NCF4.hpp:282
MonomialHash mPreviousColumnMonomials
Definition NCF4.hpp:236
char * str()
Definition buffer.hpp:72
int M2_gbTrace
Definition m2-types.cpp:52
void emit_wrapped(const char *s)
Definition text-io.cpp:27

References emit_wrapped(), freeAlgebra(), FreeAlgebra::heft_degree(), M2_gbTrace, mColumnMonomials, mFreeAlgebra, mInput, mIsGraded, mIsParallel, mMonomEq, mMonomHash, mMonomHashEqual, mNumThreads, mOverlapTable, mPreviousColumnMonomials, mScheduler, mVectorArithmetic, and buffer::str().