Go to the source code of this file.
◆ fglmASSERT
#define fglmASSERT |
( |
|
ignore1, |
|
|
|
ignore2 |
|
) |
| |
◆ PROT
◆ PROT2
#define PROT2 |
( |
|
msg, |
|
|
|
arg |
|
) |
| |
◆ STICKYPROT
◆ STICKYPROT2
◆ fglmLinearCombination()
poly fglmLinearCombination |
( |
ideal |
source, |
|
|
poly |
monset |
|
) |
| |
Definition at line 415 of file fglmcomb.cc.
431 while ( temp !=
NULL ) {
445 for (
k= 0;
k < numMonoms;
k++ ) {
446 poly mon=
pHead( temp );
458 while ( sm !=
NULL ) {
465 if ( basisSize == basisMax ) {
466 basis= (
polyset)
omReallocSize( basis, basisMax *
sizeof( poly ), (basisMax + basisBS ) *
sizeof( poly ) );
469 basis[basisSize]=
pHead( sm );
482 for (
k= 0;
k < numMonoms;
k++ ) {
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 );
512 p= gauss.getDependence();
519 number
gcd =
p.gcd();
523 for (
k= 1;
k <=
p.size();
k++ ) {
524 if ( !
p.elemIsZero(
k ) ) {
527 comb=
pAdd( comb, temp );
534 for (
k= 0;
k < numMonoms;
k++ ) {
543 for (
k= 0;
k < basisSize;
k++ )
const Variable & v
< [in] a sqrfree bivariate poly
bool isZero(const CFArray &A)
checks if entries of A are zero
#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
#define omFreeSize(addr, size)
#define omReallocSize(addr, o_size, size)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
#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 pCopy(p)
return a copy of the poly
◆ fglmNewLinearCombination()
poly fglmNewLinearCombination |
( |
ideal |
source, |
|
|
poly |
monset |
|
) |
| |
Definition at line 153 of file fglmcomb.cc.
163 int basisMax = basisBS;
165 int * weights =
NULL;
166 int * lengthes =
NULL;
179 for (
k= 0;
k < numMonoms;
k++ ) {
190 #ifndef HAVE_EXPLICIT_CONSTR
196 #ifndef HAVE_EXPLICIT_CONSTR
208 poly temp= (source->m)[
k];
210 while ( temp !=
NULL ) {
218 lengthes= (
int *)
omAlloc( numMonoms *
sizeof(
int ) );
219 order= (
int *)
omAlloc( numMonoms *
sizeof(
int ) );
222 for (
k= 0;
k < numMonoms;
k++ )
228 fglmReduce( & current, currV,
m, numMonoms, source, weights );
231 while ( temp !=
NULL )
243 if ( basisSize == basisMax )
246 basis= (
polyset)
omReallocSize( basis, basisMax *
sizeof( poly ), (basisMax + basisBS ) *
sizeof( poly ) );
252 basis[basisSize]=
pLmInit(temp);
259 #ifndef HAVE_EXPLICIT_CONSTR
260 mv[
k].mac_constr( currV );
267 for (
k= 0;
k < numMonoms;
k++ ) {
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++ )
308 for (
k= 0;
k < numMonoms;
k++ ) {
309 lengthes[
k]=
v[
k].numNonZeroElems();
317 for (
k= numMonoms - 1;
k >= 0;
k-- ) {
318 if ( lengthes[
k] > 0 ) {
323 if ( lengthes[
k] < lengthes[best-1] ) {
332 if ( (
isZero= gauss.reduce(
v[best-1] )) ==
TRUE ) {
333 p= gauss.getDependence();
340 #ifndef HAVE_EXPLICIT_CONSTR
341 v[best-1].clearelems();
343 v[best-1].~fglmVector();
348 number
gcd =
p.gcd();
354 for (
k= 0;
k <
p.size();
k++ ) {
355 if ( !
p.elemIsZero(
k+1 ) ) {
356 temp+=
p.getconstelem(
k+1 ) * mv[order[
k]];
368 for (
k= 1;
k <= numMonoms;
k++ ) {
369 if ( ! temp.elemIsZero(
k ) ) {
388 #ifndef HAVE_EXPLICIT_CONSTR
394 for (
k= 0;
k < basisSize;
k++ )
398 #ifndef HAVE_EXPLICIT_CONSTR
401 for (
k= 0;
k < numMonoms;
k++ )
406 for (
k= 0;
k < numMonoms;
k++ )
fglmVector(fglmVectorRep *rep)
static void fglmReduce(poly *pptr, fglmVector &v, polyset m, int numMonoms, ideal source, int *w)
poly p_Cleardenom(poly p, const ring r)
static unsigned pLength(poly a)
#define pLmInit(p)
like pInit, except that expvector is initialized to that of p, p must be != NULL
◆ fglmquot()
BOOLEAN fglmquot |
( |
ideal |
sourceIdeal, |
|
|
poly |
quot, |
|
|
ideal & |
destIdeal |
|
) |
| |
Definition at line 1218 of file fglmzero.cc.
1228 if ( fglmok ==
TRUE ) {
static BOOLEAN CalculateFunctionals(const ideal &theIdeal, idealFunctionals &l)
static ideal GroebnerViaFunctionals(const idealFunctionals &l, fglmVector iv=fglmVector())
◆ fglmzero()
Definition at line 1193 of file fglmzero.cc.
1204 if ( deleteIdeal ==
TRUE )
1207 if ( fglmok ==
TRUE )
1209 L.map( sourceRing );
1212 if ( (switchBack) && (
currRing != initialRing) )
#define idDelete(H)
delete an ideal
void rChangeCurrRing(ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)