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

◆ make_minimal()

Matrix * res_comp::make_minimal ( int i) const

Definition at line 1438 of file res-a1.cpp.

1439{
1440 const FreeModule *F = minimal_free_of(i - 1);
1441 const FreeModule *G = minimal_free_of(i);
1442 MatrixConstructor result(F, G, nullptr);
1443 if (i < 0 || i > length_limit) return result.to_matrix();
1444 VECTOR(res_pair *) elems;
1445
1446 res_level *lev = resn[i];
1447 for (int j = 0; j < lev->bin.size(); j++)
1448 for (res_pair *p = lev->bin[j]->first; p != nullptr; p = p->next)
1449 elems.push_back(p);
1450
1451 int thisx = 0;
1452 for (int x = 0; x < elems.size(); x++)
1453 {
1454 res_pair *p = elems[x];
1455 if (p->syz_type == SYZ_MINIMAL)
1456 {
1457 if (p->stripped_syz == nullptr)
1458 {
1459 p->stripped_syz = R->strip(p->syz);
1460 reduce_minimal(x, p->stripped_syz, elems);
1461 }
1462 result.set_column(thisx++, R->to_vector(p->stripped_syz, F, 1));
1463 }
1464 }
1465 return result.to_matrix();
1466}
int length_limit
Definition res-a1.hpp:99
res_poly * R
Definition res-a1.hpp:79
const FreeModule * minimal_free_of(int i) const
Definition res-a1.cpp:1363
void reduce_minimal(int x, resterm *&f, VECTOR(res_pair *)&elems) const
Definition res-a1.cpp:1410
int p
VALGRIND_MAKE_MEM_DEFINED & result(result)
#define VECTOR(T)
Definition newdelete.hpp:78
volatile int x
@ SYZ_MINIMAL
tbb::flow::graph G

References G, length_limit, Matrix, minimal_free_of(), p, R, reduce_minimal(), result(), SYZ_MINIMAL, VECTOR, and x.

Referenced by get_matrix().