MCPcopy Create free account
hub / github.com/Singular/Singular / simplify

Method simplify

Singular/dyn_modules/Order/nforder.cpp:275–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275nforder *nforder::simplify() {
276 coeffs c = basecoeffs();
277 if (!baseorder || !baseorder->baseorder) {
278 ref_count_incref();
279 return this;
280 }
281 nforder * O = baseorder;
282 number den = n_Copy(divisor, c);
283 bigintmat *bas = getBasis();
284 while (O->baseorder) {
285 bigintmat * b = bimMult(bas, O->viewBasis());
286 n_InpMult(den, O->divisor, c);
287 O = O->baseorder;
288 delete bas;
289 bas = b;
290 }
291 nforder * res = new nforder(O, bas, den, c);
292 if (discriminant)
293 res->discriminant = n_Copy(discriminant, c);
294
295 //TODO: copy multtable if we have it
296 delete bas;
297 n_Delete(&den, c);
298 return res;
299}
300
301void nforder::elAdd(bigintmat *a, bigintmat *b) {
302 if ((a->cols() != 1) || (a->rows() != dimension) || (b->cols() != 1) || (b->rows() != dimension)) {

Callers 3

symm.pyFile · 0.45
nforder_simplifyFunction · 0.45
pmaximalFunction · 0.45

Calls 5

n_CopyFunction · 0.85
bimMultFunction · 0.85
n_InpMultFunction · 0.85
n_DeleteFunction · 0.85
viewBasisMethod · 0.45

Tested by

no test coverage detected