245{
246
247
250
252 {
254 R,
255 0,
256 0,
257
258 true);
259 }
260
261 auto& thislevel = C.
level(lev);
262 int ncols = static_cast<int>(thislevel.size());
263 int nrows =
static_cast<int>(C.
level(lev - 1).size());
264
265
267
268
269 Nterm** comps =
newarray(Nterm*, nrows);
270 Nterm** last =
newarray(Nterm*, nrows);
271
273
275
276 int j = 0;
277 for (auto j1 = thislevel.cbegin(); j1 != thislevel.cend(); ++j1, ++j)
278 {
279
280
281 const ResPolynomial& f = (*j1).mSyzygy;
282 for (int i = 0; i < nrows; i++)
283 {
284 comps[i] = nullptr;
285 last[i] = nullptr;
286
287 }
289 for (
int i = 0; i < f.
len; i++)
290 {
297 if (g == nullptr) continue;
299 if (last[comp] == nullptr)
300 {
301 comps[comp] = g;
302 last[comp] = g;
303 }
304 else
305 {
306 last[comp]->
next = g;
307 last[comp] = g;
308 }
309 }
310
311 for (
int r = 0; r < nrows; r++)
result->set_entry(r, j, comps[r]);
312 }
313
318}
monomial make_one() const
void from_expvector(const_exponents exp, monomial result) const
static MutableMatrix * zero_matrix(const Ring *R, size_t nrows, size_t ncols, bool dense)
virtual const Monoid * getMonoid() const
virtual ring_elem make_flat_term(const ring_elem a, const_monomial m) const =0
bool to_expvector(res_const_packed_monomial m, res_ntuple_monomial result, component_index &result_comp) const
int monomial_size(res_const_packed_monomial m) const
const ResMonoid & monoid() const
std::vector< res_monomial_word > monoms
virtual const PolynomialRing * cast_to_PolynomialRing() const
std::vector< FrameElement > & level(int lev)
const ResPolyRing & ring() const
const VectorArithmetic & vectorArithmetic() const
ring_elem ringElemFromElementArray(const ElementArray &coeffs, int index) const
VALGRIND_MAKE_MEM_DEFINED & result(result)
const mpreal exp(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())