Go to the source code of this file.
◆ fractalWalkConsistency()
WalkState fractalWalkConsistency |
( |
ring |
sring, |
|
|
ring |
dring, |
|
|
int * |
vperm |
|
) |
| |
Definition at line 224 of file walkProc.cc.
231 WerrorS(
"rings must have same characteristic" );
238 WerrorS(
"only works for global orderings" );
244 WerrorS(
"rings must have same number of variables" );
250 WerrorS(
"rings must have same number of parameters" );
254 if ( state !=
WalkOk )
return state;
259 int npar =
rPar(sring);
266 snames=sring->cf->extRing->names;
267 dnames=dring->cf->extRing->names;
268 pperm= (
int *)
omAlloc0( (npar+1)*
sizeof( int ) );
278 dring->names, nvar, dnames, npar, vperm, pperm,
281 for (
k= nvar; (
k > 0) && (state ==
WalkOk);
k-- )
284 WerrorS(
"variable names do not agree" );
288 for (
k= npar; (
k > 0) && (state ==
WalkOk);
k-- )
289 if ( pperm[
k-1] >= 0 )
291 WerrorS(
"parameter names do not agree" );
297 for (
k= nvar; (
k > 0) && (state ==
WalkOk);
k-- )
298 if ( vperm[
k] != (
k) )
300 WerrorS(
"orders of variables do not agree" );
305 for (
k= npar; (
k > 0) && (state ==
WalkOk);
k-- )
306 if ( pperm[
k-1] != (-
k) )
308 WerrorS(
"orders of parameters do not agree" );
315 if ( state !=
WalkOk )
return state;
318 if ( (sring->qideal !=
NULL) || (dring->qideal !=
NULL) )
320 WerrorS(
"rings are not allowed to be qrings");
325 while(dring->order[
i]!=0){
341 while(sring->order[
i]!=0)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
static int rPar(const ring r)
(r->cf->P)
#define omFreeSize(addr, size)
static short rVar(const ring r)
#define rVar(r) (r->N)
void WerrorS(const char *s)
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)
◆ walkConsistency()
WalkState walkConsistency |
( |
ring |
sring, |
|
|
ring |
dring, |
|
|
int * |
vperm |
|
) |
| |
Definition at line 57 of file walkProc.cc.
64 WerrorS(
"rings must have same characteristic" );
70 WerrorS(
"only works for global orderings" );
73 else if ( sring->N != dring->N )
75 WerrorS(
"rings must have same number of variables" );
78 else if (
rPar(sring) !=
rPar(dring) )
80 WerrorS(
"rings must have same number of parameters" );
84 if ( state !=
WalkOk )
return state;
88 int nvar =
rVar(sring);
89 int npar =
rPar(sring);
95 snames=sring->cf->extRing->names;
96 dnames=dring->cf->extRing->names;
97 pperm= (
int *)
omAlloc0( (npar+1)*
sizeof( int ) );
107 dring->names, nvar, dnames, npar, vperm, pperm,
110 for (
k= nvar; (
k > 0) && (state ==
WalkOk);
k-- )
113 WerrorS(
"variable names do not agree" );
117 for (
k= npar-1; (
k >= 0) && (state ==
WalkOk);
k-- )
120 WerrorS(
"parameter names do not agree" );
125 for (
k= nvar; (
k > 0) && (state ==
WalkOk);
k-- )
126 if ( vperm[
k] != (
k) )
128 WerrorS(
"orders of variables do not agree" );
133 for (
k= npar; (
k > 0) && (state ==
WalkOk);
k-- )
135 if ( pperm[
k-1] != (-
k) )
137 WerrorS(
"orders of parameters do not agree" );
144 if ( state !=
WalkOk )
return state;
147 if ( (sring->qideal !=
NULL) || (dring->qideal !=
NULL) )
149 WerrorS(
"rings are not allowed to be qrings");
154 while(dring->order[
i]!=0)
174 while(sring->order[
i]!=0)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
static int rPar(const ring r)
(r->cf->P)
#define omFreeSize(addr, size)
static short rVar(const ring r)
#define rVar(r) (r->N)
void WerrorS(const char *s)
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)