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

◆ calc()

int GBKernelComputation::calc ( )

Definition at line 100 of file Eschreyer.cpp.

101{
102 // First find the skeleton
103 for (int i = 0; i < gb.size(); i++) new_pairs(i);
104
105 // Debug code
106 GBMatrix *mm = new GBMatrix(G);
107 for (int p = 0; p < syzygies.size(); p++)
108 mm->append(GR->gbvector_copy(syzygies[p]));
109 buffer o;
110 Matrix *m = mm->to_matrix();
111 if (M2_gbTrace >= 5)
112 {
113 o << "skeleton = " << newline;
114 m->text_out(o);
115 emit(o.str());
116 }
117
118 // Sort the skeleton now?
119
120 // Now reduce each one of these elements
121 for (int j = 0; j < syzygies.size(); j++)
122 {
123 gbvector *v = s_pair(syzygies[j]);
124 reduce(v, syzygies[j]);
125 }
126 return COMP_DONE;
127}
void reduce(gbvector *&g, gbvector *&gsyz)
gc_vector< gbvector * > syzygies
Definition Eschreyer.hpp:99
const FreeModule * G
Definition Eschreyer.hpp:94
void new_pairs(int i)
gc_vector< gbvector * > gb
Definition Eschreyer.hpp:98
gbvector * s_pair(gbvector *syz)
void text_out(buffer &o) const
Definition matrix.cpp:1316
char * str()
Definition buffer.hpp:72
@ COMP_DONE
Definition computation.h:60
#define Matrix
Definition factory.cpp:14
int p
char newline[]
Definition m2-types.cpp:49
int M2_gbTrace
Definition m2-types.cpp:52
Matrix * to_matrix()
Definition Eschreyer.cpp:55
void append(gbvector *f)
Definition Eschreyer.cpp:53
void emit(const char *s)
Definition text-io.cpp:41

References GBMatrix::append(), COMP_DONE, emit(), G, gb, GR, M2_gbTrace, Matrix, new_pairs(), newline, p, reduce(), s_pair(), buffer::str(), syzygies, Matrix::text_out(), and GBMatrix::to_matrix().