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

◆ to_M2_matrix()

Matrix * ResF4toM2Interface::to_M2_matrix ( SchreyerFrame & C,
int lev,
const FreeModule * tar,
const FreeModule * src )
static

Definition at line 220 of file res-f4-m2-interface.cpp.

224{
225 if (lev < 0 or lev > C.maxLevel())
226 {
227 MatrixConstructor zero(tar, src);
228 return zero.to_matrix();
229 }
230 auto& thislevel = C.level(lev);
231 MatrixConstructor result(tar, src);
232 int j = 0;
233 for (auto i = thislevel.cbegin(); i != thislevel.cend(); ++i, ++j)
234 {
235 vec v = to_M2_vec(C.ring(), i->mSyzygy, tar);
236 result.set_column(j, v);
237 }
238 return result.to_matrix();
239}
static vec to_M2_vec(const ResPolyRing &R, const ResPolynomial &f, const FreeModule *F)
std::vector< FrameElement > & level(int lev)
const ResPolyRing & ring() const
int zero
VALGRIND_MAKE_MEM_DEFINED & result(result)

References SchreyerFrame::level(), Matrix, SchreyerFrame::maxLevel(), result(), SchreyerFrame::ring(), to_M2_vec(), and zero.

Referenced by F4ResComputation::get_matrix().