124 return ( (
best > 0) );
163 int basisMax = basisBS;
165 int * weights =
NULL;
166 int * lengths =
NULL;
190#ifndef HAVE_EXPLICIT_CONSTR
196#ifndef HAVE_EXPLICIT_CONSTR
243 if ( basisSize == basisMax )
246 basis= (
polyset)
omReallocSize( basis, basisMax *
sizeof( poly ), (basisMax + basisBS ) *
sizeof( poly ) );
259#ifndef HAVE_EXPLICIT_CONSTR
270#ifndef HAVE_EXPLICIT_CONSTR
271 v[
k].mac_constr_i( basisSize );
273 v[
k].fglmVector( basisSize );
276 while ( mon !=
NULL ) {
288 v[
k].setelem(
b+1, coeff );
299 for (
k= 0;
k < basisSize;
k++ )
309 lengths[
k]=
v[
k].numNonZeroElems();
318 if ( lengths[
k] > 0 ) {
323 if ( lengths[
k] < lengths[
best-1] ) {
340#ifndef HAVE_EXPLICIT_CONSTR
341 v[
best-1].clearelems();
343 v[
best-1].~fglmVector();
354 for (
k= 0;
k <
p.size();
k++ ) {
355 if ( !
p.elemIsZero(
k+1 ) ) {
356 temp+=
p.getconstelem(
k+1 ) *
mv[order[
k]];
369 if ( !
temp.elemIsZero(
k ) ) {
388#ifndef HAVE_EXPLICIT_CONSTR
394 for (
k= 0;
k < basisSize;
k++ )
398#ifndef HAVE_EXPLICIT_CONSTR
465 if ( basisSize == basisMax ) {
466 basis= (
polyset)
omReallocSize( basis, basisMax *
sizeof( poly ), (basisMax + basisBS ) *
sizeof( poly ) );
483#ifndef HAVE_EXPLICIT_CONSTR
484 v[
k].mac_constr_i( basisSize );
486 v[
k].fglmVector( basisSize );
490 while ( mon !=
NULL ) {
500 v[
k].setelem(
b+1, coeff );
523 for (
k= 1;
k <=
p.size();
k++ ) {
524 if ( !
p.elemIsZero(
k ) ) {
543 for (
k= 0;
k < basisSize;
k++ )
BOOLEAN reduce(fglmVector v)
fglmVector getDependence()
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
const Variable & v
< [in] a sqrfree bivariate poly
bool isZero(const CFArray &A)
checks if entries of A are zero
‘factory.h’ is the user interface to Factory.
static void fglmReduce(poly *pptr, fglmVector &v, polyset m, int numMonoms, ideal source, int *w)
poly fglmLinearCombination(ideal source, poly monset)
static void fglmEliminateMonomials(poly *pptr, fglmVector &v, polyset monomials, int numMonoms)
poly fglmNewLinearCombination(ideal source, poly monset)
static BOOLEAN fglmReductionStep(poly *pptr, ideal source, int *w)
#define STICKYPROT2(msg, arg)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
STATIC_VAR gmp_float * diff
#define omFreeSize(addr, size)
#define omReallocSize(addr, o_size, size)
poly p_Cleardenom(poly p, const ring r)
static int pLength(poly a)
#define __p_Mult_nn(p, n, r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatibility layer for legacy polynomial operations (over currRing)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define pCmp(p1, p2)
pCmp: args may be NULL returns: (p2==NULL ? 1 : (p1 == NULL ? -1 : p_LmCmp(p1, p2)))
#define pLmInit(p)
like pInit, except that expvector is initialized to that of p, p must be != NULL
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
#define pGetExp(p, i)
Exponent.
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
#define pCopy(p)
return a copy of the poly