 |
My Project
debian-1:4.1.2-p1+ds-2
|
Go to the source code of this file.
◆ FglmState
Enumerator |
---|
FglmOk | |
FglmHasOne | |
FglmNoIdeal | |
FglmNotReduced | |
FglmNotZeroDim | |
FglmIncompatibleRings | |
FglmPolyIsOne | |
FglmPolyIsZero | |
Definition at line 39 of file fglm.cc.
◆ fglmConsistency()
Definition at line 121 of file fglm.cc.
125 ring dring =
IDRING( dringHdl );
126 ring sring =
IDRING( sringHdl );
130 WerrorS(
"rings must have same characteristic" );
133 if ( (sring->OrdSgn != 1) || (dring->OrdSgn != 1) )
135 WerrorS(
"only works for global orderings" );
138 if ( sring->N != dring->N )
140 WerrorS(
"rings must have same number of variables" );
145 WerrorS(
"rings must have same number of parameters" );
148 if ( state !=
FglmOk )
return state;
152 int npar =
rPar(sring);
155 pperm= (
int *)
omAlloc0( (npar+1)*
sizeof( int ) );
159 dring->names, nvar,
rParameter(dring), npar, vperm, pperm,
161 for (
k= nvar; (
k > 0) && (state ==
FglmOk);
k-- )
164 WerrorS(
"variable names do not agree" );
167 for (
k= npar-1; (
k >= 0) && (state ==
FglmOk);
k-- )
170 WerrorS(
"parameter names do not agree" );
175 if ( state !=
FglmOk )
return state;
177 if ( sring->qideal !=
NULL )
179 if ( dring->qideal ==
NULL )
181 Werror(
"%s is a qring, current ring not", sringHdl->
id );
189 for (
k=
IDELEMS( sring->qideal )-1;
k >= 0;
k-- )
190 (sqind->m)[
k]=
p_PermPoly( (sring->qideal->m)[
k], vperm, sring,
192 ideal sqindred =
kNF( dring->qideal,
NULL, sqind );
193 if ( !
idIs0( sqindred ) )
195 WerrorS(
"the quotients do not agree" );
201 if ( state !=
FglmOk )
return state;
203 int * dsvperm = (
int *)
omAlloc0( (nvar+1)*
sizeof( int ) );
205 dsvperm,
NULL, sring->cf->type);
208 for (
k=
IDELEMS( dring->qideal )-1;
k >= 0;
k-- )
209 (dqins->m)[
k]=
p_PermPoly( (dring->qideal->m)[
k], dsvperm, sring,
211 ideal dqinsred =
kNF( sring->qideal,
NULL, dqins );
212 if ( !
idIs0( dqinsred ) )
214 WerrorS(
"the quotients do not agree" );
220 if ( state !=
FglmOk )
return state;
224 if ( dring->qideal !=
NULL )
226 Werror(
"current ring is a qring, %s not", sringHdl->
id );
◆ fglmIdealcheck()
Definition at line 242 of file fglm.cc.
251 poly
p = (theIdeal->m)[
k];
◆ fglmProc()
Definition at line 279 of file fglm.cc.
285 ideal destIdeal =
NULL;
323 (destIdeal->m)[0]=
pOne();
327 Werror(
"ring %s and current ring are incompatible", first->
Name() );
331 Werror(
"Can't find ideal %s in ring %s", second->
Name(), first->
Name() );
335 Werror(
"The ideal %s has to be 0-dimensional", second->
Name() );
339 Werror(
"The ideal %s has to be given by a reduced SB", second->
Name() );
347 result->data= (
void *)destIdeal;
◆ fglmQuotProc()
Definition at line 356 of file fglm.cc.
361 ideal sourceIdeal = (ideal)first->
Data();
362 poly quot = (poly)second->
Data();
363 ideal destIdeal =
NULL;
385 (destIdeal->m)[0]=
pOne();
389 Werror(
"The ideal %s has to be 0-dimensional", first->
Name() );
393 Werror(
"The poly %s has to be reduced", second->
Name() );
399 for (
k=
IDELEMS( sourceIdeal )-1;
k >=0;
k-- )
400 (destIdeal->m)[
k]=
pCopy( (sourceIdeal->m)[
k] );
405 (destIdeal->m)[0]=
pOne();
413 result->data= (
void *)destIdeal;
◆ fglmUpdateresult()
void fglmUpdateresult |
( |
ideal & |
result | ) |
|
◆ fglmUpdatesource()
ideal fglmUpdatesource |
( |
const ideal |
sourceIdeal | ) |
|
Definition at line 57 of file fglm.cc.
62 for (
k=
IDELEMS( sourceIdeal )-1;
k >=0;
k-- )
63 (newSource->m)[
k]=
pCopy( (sourceIdeal->m)[
k] );
◆ findUniProc()
Definition at line 424 of file fglm.cc.
427 ideal destIdeal =
NULL;
430 sourceIdeal = (ideal)first->
Data();
441 for (
k=
IDELEMS( sourceIdeal ) - 1;
k >= 0;
k-- )
445 if (purePowers[
i-1]==0)
470 (destIdeal->m)[0]=
pOne();
474 Werror(
"The ideal %s has to be 0-dimensional", first->
Name() );
478 Werror(
"The ideal %s has to be reduced", first->
Name() );
486 result->data= (
void *)destIdeal;
#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 pIsConstant(p)
like above, except that Comp must be 0
#define idDelete(H)
delete an ideal
FglmState fglmConsistency(idhdl sringHdl, idhdl dringHdl, int *vperm)
void fglmUpdateresult(ideal &result)
const CanonicalForm CFMap CFMap & N
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
Class used for (list of) interpreter objects.
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
#define omFreeSize(addr, size)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
BOOLEAN fglmzero(ring sourceRing, ideal &sourceIdeal, ring destRing, ideal &destideal, BOOLEAN switchBack=TRUE, BOOLEAN deleteIdeal=FALSE)
static int rPar(const ring r)
(r->cf->P)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
#define fglmASSERT(ignore1, ignore2)
BOOLEAN FindUnivariateWrapper(ideal source, ideal &destIdeal)
void Werror(const char *fmt,...)
ideal idInit(int idsize, int rank)
initialise an ideal / module
BOOLEAN assumeStdFlag(leftv h)
void WerrorS(const char *s)
FglmState fglmIdealcheck(const ideal theIdeal)
void maFindPerm(char const *const *const preim_names, int preim_n, char const *const *const preim_par, int preim_p, char const *const *const names, int n, char const *const *const par, int nop, int *perm, int *par_perm, n_coeffType ch)
ideal fglmUpdatesource(const ideal sourceIdeal)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
int status int void size_t count
#define pCopy(p)
return a copy of the poly
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
static const char ** rParameter(const ring r)
(r->cf->parameter)
BOOLEAN fglmquot(ideal sourceIdeal, poly quot, ideal &destIdeal)