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

Function pivotScore

kernel/linear_algebra/linearAlgebra.cc:50–59  ·  view source on GitHub ↗

* The returned score is based on the implementation of 'nSize' for * numbers (, see numbers.h): nSize(n) provides a measure for the * complexity of n. Thus, less complex pivot elements will be * preferred, and get therefore a smaller pivot score. Consequently, * we simply return the value of nSize. * An exception to this rule are the ground fields R, long R, and * long C: In these, the resul

Source from the content-addressed store, hash-verified

48 * the negative of nSize will be returned.
49 **/
50int pivotScore(number n, const ring r)
51{
52 int s = n_Size(n, r->cf);
53 if (rField_is_long_C(r) ||
54 rField_is_long_R(r) ||
55 rField_is_R(r))
56 return -s;
57 else
58 return s;
59}
60
61/**
62 * This code computes a score for each non-zero matrix entry in

Callers 1

pivotFunction · 0.85

Calls 4

n_SizeFunction · 0.85
rField_is_long_CFunction · 0.85
rField_is_long_RFunction · 0.85
rField_is_RFunction · 0.85

Tested by

no test coverage detected