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

◆ tensor()

SchreyerOrder * SchreyerOrder::tensor ( const SchreyerOrder * G) const

Definition at line 198 of file schorder.cpp.

200{
201 // Since this is called only from FreeModule::tensor,
202 // we assume that 'this', 'G' have the same monoid 'M'.
203
205 monomial base = M->make_one();
206
207 int next = 0;
208 for (int i = 0; i < rank(); i++)
209 for (int j = 0; j < G->rank(); j++)
210 {
211 M->mult(base_monom(i), G->base_monom(j), base);
212 result->append(next++, base);
213 }
214
215 M->remove(base);
216 return result;
217}
const Monoid * M
Definition schorder.hpp:69
SchreyerOrder(const Monoid *m)
Definition schorder.hpp:77
int rank() const
Definition schorder.hpp:89
const_monomial base_monom(int i) const
Definition schorder.hpp:91
static CanonicalForm base
Definition factory.cpp:289
#define monomial
Definition gb-toric.cpp:11
VALGRIND_MAKE_MEM_DEFINED & result(result)
tbb::flow::graph G

References base, base_monom(), G, M, monomial, rank(), result(), and SchreyerOrder().