 |
My Project
debian-1:4.1.1-p2+ds-4build3
|
Go to the source code of this file.
|
static poly | NF_Proc_Dummy (ideal, ideal, poly, int, int, const ring) |
|
static ideal | BBA_Proc_Dummy (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring) |
|
poly | nc_p_CopyGet (poly a, const ring r) |
|
poly | nc_p_CopyPut (poly a, const ring r) |
|
poly | nc_p_Bracket_qq (poly p, const poly q, const ring r) |
| returns [p,q], destroys p More...
|
|
int & | getNCExtensions () |
|
int | setNCExtensions (int iMask) |
|
bool | ncExtensions (int iMask) |
|
poly | gnc_pp_Mult_mm (const poly p, const poly m, const ring r, poly &last) |
|
poly | gnc_p_Mult_mm (poly p, const poly m, const ring r) |
|
poly | gnc_mm_Mult_p (const poly m, poly p, const ring r) |
|
poly | gnc_mm_Mult_pp (const poly m, const poly p, const ring r) |
|
poly | gnc_CreateSpolyOld (const poly p1, const poly p2, const ring r) |
|
poly | gnc_ReduceSpolyOld (const poly p1, poly p2, const ring r) |
|
poly | gnc_CreateSpolyNew (const poly p1, const poly p2, const ring r) |
|
poly | gnc_ReduceSpolyNew (const poly p1, poly p2, const ring r) |
|
void | gnc_kBucketPolyRedNew (kBucket_pt b, poly p, number *c) |
|
void | gnc_kBucketPolyRed_ZNew (kBucket_pt b, poly p, number *c) |
|
void | gnc_kBucketPolyRedOld (kBucket_pt b, poly p, number *c) |
|
void | gnc_kBucketPolyRed_ZOld (kBucket_pt b, poly p, number *c) |
|
void | nc_CleanUp (nc_struct *p) |
|
void | nc_rCleanUp (ring r) |
|
poly | nc_p_Minus_mm_Mult_qq (poly p, const poly m, const poly q, int &shorter, const poly, const ring r) |
| for p_Minus_mm_Mult_qq in pInline2.h More...
|
|
poly | nc_p_Plus_mm_Mult_qq (poly p, const poly m, const poly q, int &lp, const int, const ring r) |
|
poly | _gnc_p_Mult_q (poly p, poly q, const int copy, const ring r) |
|
poly | _nc_p_Mult_q (poly pPolyP, poly pPolyQ, const ring rRing) |
| general NC-multiplication with destruction More...
|
|
poly | _nc_pp_Mult_qq (const poly pPolyP, const poly pPolyQ, const ring rRing) |
| general NC-multiplication without destruction More...
|
|
poly | gnc_mm_Mult_nn (int *F, int *G, const ring r) |
|
poly | gnc_mm_Mult_uu (int *F, int jG, int bG, const ring r) |
|
poly | gnc_uu_Mult_ww (int i, int a, int j, int b, const ring r) |
|
poly | gnc_p_Mult_mm_Common (poly p, const poly m, int side, const ring r) |
|
poly | gnc_pp_Mult_mm (const poly p, const poly m, const ring r) |
|
poly | gnc_uu_Mult_ww_vert (int i, int a, int j, int b, const ring r) |
|
static poly | gnc_uu_Mult_ww_formula (int i, int a, int j, int b, const ring r) |
|
poly | gnc_uu_Mult_ww_horvert (int i, int a, int j, int b, const ring r) |
|
poly | nc_CreateShortSpoly (poly p1, poly p2, const ring r) |
|
void | nc_PolyPolyRedOld (poly &b, poly p, number *c, const ring r) |
|
void | nc_PolyPolyRedNew (poly &b, poly p, number *c, const ring r) |
|
void | nc_PolyPolyRed (poly &b, poly p, number *c, const ring r) |
|
poly | nc_mm_Bracket_nn (poly m1, poly m2, const ring r) |
| returns [m1,m2] for two monoms, destroys nothing without coeffs More...
|
|
matrix | nc_PrintMat (int a, int b, ring r, int metric) |
| returns matrix with the info on noncomm multiplication More...
|
|
void | nc_CleanUp (ring r) |
|
void | nc_rKill (ring r) |
| complete destructor More...
|
|
BOOLEAN | nc_CheckSubalgebra (poly PolyVar, ring r) |
|
BOOLEAN | gnc_CheckOrdCondition (matrix D, ring r) |
|
BOOLEAN | gnc_InitMultiplication (ring r, bool bSetupQuotient=false) |
|
BOOLEAN | nc_CallPlural (matrix CCC, matrix DDD, poly CCN, poly DDN, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring) |
| returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type, DO NOT initialize multiplication but call for it at the end checks the ordering condition and evtl. NDC NOTE: all the data belong to the curr, we change r which may be the same ring, and must have the same representation! More...
|
|
bool | nc_rCopy (ring res, const ring r, bool bSetupQuotient) |
|
static void | gnc_p_ProcsSet (ring rGR, p_Procs_s *p_Procs) |
|
void | nc_p_ProcsSet (ring rGR, p_Procs_s *p_Procs) |
|
poly | nc_pSubst (poly p, int n, poly e, const ring r) |
| substitute the n-th variable by e in p destroy p e is not a constant More...
|
|
ring | nc_rCreateNCcomm (ring r) |
|
poly | p_CopyEmbed (poly p, ring srcRing, int shift, int, ring dstRing) |
|
BOOLEAN | rIsLikeOpposite (ring rBase, ring rCandidate) |
| checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so More...
|
|
poly | pOppose (ring Rop, poly p, const ring dst) |
| opposes a vector p from Rop to currRing (dst!) More...
|
|
ideal | idOppose (ring Rop, ideal I, const ring dst) |
| opposes a module I from Rop to currRing(dst) More...
|
|
bool | nc_SetupQuotient (ring rGR, const ring rG, bool bCopy) |
|
◆ freeN
◆ freeT
◆ MYTEST
◆ OUTPUT
◆ PLURAL_INTERNAL_DECLARATIONS
#define PLURAL_INTERNAL_DECLARATIONS |
◆ _gnc_p_Mult_q()
poly _gnc_p_Mult_q |
( |
poly |
p, |
|
|
poly |
q, |
|
|
const int |
copy, |
|
|
const ring |
r |
|
) |
| |
◆ _nc_p_Mult_q()
poly _nc_p_Mult_q |
( |
poly |
pPolyP, |
|
|
poly |
pPolyQ, |
|
|
const ring |
rRing |
|
) |
| |
general NC-multiplication with destruction
Definition at line 215 of file old.gring.cc.
◆ _nc_pp_Mult_qq()
poly _nc_pp_Mult_qq |
( |
const poly |
pPolyP, |
|
|
const poly |
pPolyQ, |
|
|
const ring |
rRing |
|
) |
| |
general NC-multiplication without destruction
Definition at line 254 of file old.gring.cc.
276 for( poly q = pPolyQ; q !=
NULL; q =
pNext(q) )
◆ BBA_Proc_Dummy()
◆ getNCExtensions()
◆ gnc_CheckOrdCondition()
◆ gnc_CreateSpolyNew()
Definition at line 1557 of file old.gring.cc.
1571 if ((lCompP1!=lCompP2) && (lCompP1!=0) && (lCompP2!=0))
1574 WerrorS(
"gnc_CreateSpolyNew: different non-zero components!");
1590 poly pL =
p_Lcm(p1,p2,r);
1628 WarnS(
"gnc_CreateSpolyNew: wrong monomials!");
1684 WerrorS(
"ERROR in nc_CreateSpoly: result of multiplication is Zero!\n");
◆ gnc_CreateSpolyOld()
◆ gnc_InitMultiplication()
BOOLEAN gnc_InitMultiplication |
( |
ring |
r, |
|
|
bool |
bSetupQuotient = false |
|
) |
| |
Definition at line 3040 of file old.gring.cc.
3049 r->GetNC()->IsSkewConstant=1;
3066 r->GetNC()->MTsize = (
int *)
omAlloc0((r->N*(r->N-1))/2*
sizeof(
int));
3067 id_Test((ideal)r->GetNC()->C, r);
3074 for(
i=1;
i<r->N;
i++)
3076 for(
j=
i+1;
j<=r->N;
j++)
3090 r->GetNC()->MTsize[
UPMATELEM(
i,
j,r->N)] = DefMTsize;
3119 r->GetNC()->IsSkewConstant = 0;
3123 r->GetNC()->COM=
COM;
◆ gnc_kBucketPolyRed_ZNew()
void gnc_kBucketPolyRed_ZNew |
( |
kBucket_pt |
b, |
|
|
poly |
p, |
|
|
number * |
c |
|
) |
| |
Definition at line 2060 of file old.gring.cc.
2062 const ring r =
b->bucket_ring;
2090 if (c!=
NULL) *c=ctmp;
◆ gnc_kBucketPolyRed_ZOld()
void gnc_kBucketPolyRed_ZOld |
( |
kBucket_pt |
b, |
|
|
poly |
p, |
|
|
number * |
c |
|
) |
| |
Definition at line 2027 of file old.gring.cc.
2029 const ring r =
b->bucket_ring;
2056 if (c!=
NULL) *c=ctmp;
◆ gnc_kBucketPolyRedNew()
void gnc_kBucketPolyRedNew |
( |
kBucket_pt |
b, |
|
|
poly |
p, |
|
|
number * |
c |
|
) |
| |
◆ gnc_kBucketPolyRedOld()
void gnc_kBucketPolyRedOld |
( |
kBucket_pt |
b, |
|
|
poly |
p, |
|
|
number * |
c |
|
) |
| |
◆ gnc_mm_Mult_nn()
poly gnc_mm_Mult_nn |
( |
int * |
F, |
|
|
int * |
G, |
|
|
const ring |
r |
|
) |
| |
Definition at line 414 of file old.gring.cc.
422 int *F=(
int *)
omAlloc0((rN+1)*
sizeof(int));
423 int *
G=(
int *)
omAlloc0((rN+1)*
sizeof(int));
425 memcpy(F, F0,(rN+1)*
sizeof(
int));
427 memcpy(
G, G0,(rN+1)*
sizeof(
int));
433 while ((F[iF]==0)&&(iF>=1)) iF--;
444 while ((
G[jG]==0)&&(jG<rN)) jG++;
446 while ((
G[iG]==0)&&(iG>1)) iG--;
453 {
for(
int ii=rN;ii>0;ii--) F[ii]+=
G[ii]; }
461 number cff=
n_Init(1,r->cf);
467 if (r->GetNC()->IsSkewConstant==1)
470 for(
j=jG;
j<=iG;
j++)
475 for(
i=
j+1;
i<=iF;
i++)
477 cpower = cpower + F[
i];
479 cpower = cpower*
G[
j];
480 tpower = tpower + cpower;
484 n_Power(cff,tpower,&tmp_num, r->cf);
490 number totcff=
n_Init(1,r->cf);
491 for(
j=jG;
j<=iG;
j++)
496 for(
i=
j+1;
i<=iF;
i++)
502 n_Power(cff,cpower,&tmp_num, r->cf);
503 cff =
n_Mult(totcff,tmp_num, r->cf);
506 totcff =
n_Copy(cff,r->cf);
514 {
for(
int ii=rN;ii>0;ii--) F[ii]+=
G[ii]; }
536 int *Prv=(
int *)
omAlloc0((rN+1)*
sizeof(int));
537 int *Nxt=(
int *)
omAlloc0((rN+1)*
sizeof(int));
540 int cnt=0;
int cnf=0;
545 Prv[
i]=F[
i]; Nxt[
i]=0;
549 if (cnf==0)
freeT(Prv,rN);
551 for (
i=jG+1;
i<=rN;
i++)
575 number *c=(number *)
omAlloc0((rN+1)*
sizeof(number));
580 int *U=(
int *)
omAlloc0((rN+1)*
sizeof(int));
582 for (
i=jG;
i<=rN;
i++) U[
i]=Nxt[
i]+
G[
i];
◆ gnc_mm_Mult_p()
poly gnc_mm_Mult_p |
( |
const poly |
m, |
|
|
poly |
p, |
|
|
const ring |
r |
|
) |
| |
◆ gnc_mm_Mult_pp()
◆ gnc_mm_Mult_uu()
poly gnc_mm_Mult_uu |
( |
int * |
F, |
|
|
int |
jG, |
|
|
int |
bG, |
|
|
const ring |
r |
|
) |
| |
Definition at line 673 of file old.gring.cc.
682 while ((F[iF]==0)&&(iF>0)) iF-- ;
693 while ((F[jF]==0)&&(jF<=rN)) jF++;
744 int *Prv=(
int*)
omAlloc0((rN+1)*
sizeof(int));
745 int *Nxt=(
int*)
omAlloc0((rN+1)*
sizeof(int));
746 int *lF=(
int *)
omAlloc0((rN+1)*
sizeof(int));
748 int cnt=0;
int cnf=0;
752 Prv[
i]=F[
i]; Nxt[
i]=0;
761 for (
i=jG+1;
i<=rN;
i++)
764 if (cnf!=0) { Prv[
i]=0;}
811 number *c=(number *)
omAlloc0((cnt+2)*
sizeof(number));
817 int *U=(
int *)
omAlloc0((rN+1)*
sizeof(int));
821 memcpy(U, Nxt,(rN+1)*
sizeof(
int));
◆ gnc_p_Mult_mm()
poly gnc_p_Mult_mm |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const ring |
r |
|
) |
| |
◆ gnc_p_Mult_mm_Common()
poly gnc_p_Mult_mm_Common |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
int |
side, |
|
|
const ring |
r |
|
) |
| |
Definition at line 301 of file old.gring.cc.
316 int *P=(
int *)
omAlloc0((rN+1)*
sizeof(int));
317 int *
M=(
int *)
omAlloc0((rN+1)*
sizeof(int));
359 if (side==1)
s=
"gnc_p_Mult_mm";
360 else s=
"gnc_mm_Mult_p";
361 Print(
"%s: exponent mismatch %d and %d\n",
s,expP,expM);
◆ gnc_p_ProcsSet()
static void gnc_p_ProcsSet |
( |
ring |
rGR, |
|
|
p_Procs_s * |
p_Procs |
|
) |
| |
|
inlinestatic |
Definition at line 3140 of file old.gring.cc.
3143 p_Procs->p_Mult_mm = rGR->p_Procs->p_Mult_mm =
gnc_p_Mult_mm;
3190 p_Procs->p_Minus_mm_Mult_qq =
NULL;
3196 r->GetNC()->SPoly() = gnc_CreateSpoly;
3197 r->GetNC()->ReduceSPoly() = gnc_ReduceSpoly;
◆ gnc_pp_Mult_mm() [1/2]
◆ gnc_pp_Mult_mm() [2/2]
poly gnc_pp_Mult_mm |
( |
const poly |
p, |
|
|
const poly |
m, |
|
|
const ring |
r, |
|
|
poly & |
last |
|
) |
| |
◆ gnc_ReduceSpolyNew()
poly gnc_ReduceSpolyNew |
( |
const poly |
p1, |
|
|
poly |
p2, |
|
|
const ring |
r |
|
) |
| |
Definition at line 1398 of file old.gring.cc.
1405 if ((lCompP1!=lCompP2) && (lCompP1!=0) && (lCompP2!=0))
1408 WerrorS(
"gnc_ReduceSpolyNew: different non-zero components!");
◆ gnc_ReduceSpolyOld()
poly gnc_ReduceSpolyOld |
( |
const poly |
p1, |
|
|
poly |
p2, |
|
|
const ring |
r |
|
) |
| |
◆ gnc_uu_Mult_ww()
poly gnc_uu_Mult_ww |
( |
int |
i, |
|
|
int |
a, |
|
|
int |
j, |
|
|
int |
b, |
|
|
const ring |
r |
|
) |
| |
Definition at line 1039 of file old.gring.cc.
1069 n_Power(tmp_number,a*
b,&tmp_number, r->cf);
1082 if( FormulaMultiplier !=
NULL )
1083 PairType = FormulaMultiplier->
GetPair(
j,
i);
1096 int cMTsize=r->GetNC()->MTsize[vik];
1100 if (newcMTsize<=cMTsize)
1103 if (out !=
NULL)
return (out);
1106 if (newcMTsize > cMTsize)
1108 int inM=(((newcMTsize+6)/7)*7);
1109 assume (inM>=newcMTsize);
1114 for (
k=1;
k<=cMTsize;
k++)
1116 for (
m=1;
m<=cMTsize;
m++)
1132 r->GetNC()->MTsize[
UPMATELEM(
j,
i,rN)] = newcMTsize;
◆ gnc_uu_Mult_ww_formula()
static poly gnc_uu_Mult_ww_formula |
( |
int |
i, |
|
|
int |
a, |
|
|
int |
j, |
|
|
int |
b, |
|
|
const ring |
r |
|
) |
| |
|
inlinestatic |
◆ gnc_uu_Mult_ww_horvert()
poly gnc_uu_Mult_ww_horvert |
( |
int |
i, |
|
|
int |
a, |
|
|
int |
j, |
|
|
int |
b, |
|
|
const ring |
r |
|
) |
| |
Definition at line 1144 of file old.gring.cc.
1166 while ( (
MATELEM(cMT,1,toXY)==
NULL) && (toXY>=2)) toXY--;
1167 for (
m=toXY+1;
m<=
b;
m++)
1180 WarnS(
"Error: a=1; MATELEM!=0");
1190 while ( (
MATELEM(cMT,toYX,1)==
NULL) && (toYX>=2)) toYX--;
1191 for (
m=toYX+1;
m<=a;
m++)
1204 WarnS(
"Error: b=1, MATELEM!=0");
1214 int dXY=0;
int dYX=0;
1217 int toX=a-1;
int toY=
b-1;
1224 while ( (
MATELEM(cMT,1,toXY)==
NULL) && (toXY>=1)) toXY--;
1230 while ( (
MATELEM(cMT,a,toY)==
NULL) && (toY>=1)) toY--;
1233 while ( (
MATELEM(cMT,toYX,1)==
NULL) && (toYX>=1)) toYX--;
1244 for (
m=toXY+1;
m<=
b;
m++)
1257 WarnS(
"dYX>=dXY,toXY; MATELEM==0");
1264 for (
k=toX+1;
k<=a;
k++)
1277 WarnS(
"dYX>=dXY,toX; MATELEM==0");
1289 for (
m=toYX+1;
m<=a;
m++)
1302 WarnS(
"dYX<dXY,toYX; MATELEM==0");
1309 for (
k=toY+1;
k<=
b;
k++)
1322 WarnS(
"dYX<dXY,toY; MATELEM==0");
◆ gnc_uu_Mult_ww_vert()
poly gnc_uu_Mult_ww_vert |
( |
int |
i, |
|
|
int |
a, |
|
|
int |
j, |
|
|
int |
b, |
|
|
const ring |
r |
|
) |
| |
Definition at line 931 of file old.gring.cc.
936 matrix cMT=r->GetNC()->MT[cMTindex];
958 cMT=r->GetNC()->MT[cMTindex];
980 cMT=r->GetNC()->MT[cMTindex];
◆ idOppose()
ideal idOppose |
( |
ring |
Rop, |
|
|
ideal |
I, |
|
|
const ring |
dst |
|
) |
| |
opposes a module I from Rop to currRing(dst)
Definition at line 3406 of file old.gring.cc.
3409 if ( Rop == dst )
return id_Copy(I, dst);
3414 WarnS(
"an opposite ring should be used");
3418 ideal idOp =
idInit(I->ncols, I->rank);
3419 for (
i=0;
i< (I->ncols)*(I->nrows);
i++)
◆ nc_CallPlural()
BOOLEAN nc_CallPlural |
( |
matrix |
CCC, |
|
|
matrix |
DDD, |
|
|
poly |
CCN, |
|
|
poly |
DDN, |
|
|
ring |
r, |
|
|
bool |
bSetupQuotient, |
|
|
bool |
bCopyInput, |
|
|
bool |
bBeQuiet, |
|
|
ring |
curr, |
|
|
bool |
dummy_ring |
|
) |
| |
returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type, DO NOT initialize multiplication but call for it at the end checks the ordering condition and evtl. NDC NOTE: all the data belong to the curr, we change r which may be the same ring, and must have the same representation!
Definition at line 2681 of file old.gring.cc.
2690 if( !bSetupQuotient)
2709 WarnS(
"commutative ring with 1 variable");
2726 PrintS(
"nc_CallPlural(), Input data, CCC: \n");
2731 PrintS(
"nc_CallPlural(), Input data, DDD: \n");
2744 if( (!bBeQuiet) && (r->GetNC() !=
NULL) )
2745 WarnS(
"going to redefine the algebra structure");
2752 matrix C;
bool bCnew =
false;
2760 bool IsSkewConstant =
false, tmpIsSkewConstant;
2779 Werror(
"Square %d x %d matrix expected", r->N, r->N);
2786 if (( CCC !=
NULL) && (CC ==
NULL)) CC = CCC;
2787 if (( CCN !=
NULL) && (CN ==
NULL)) CN = CCN;
2798 Werror(
"Square %d x %d matrix expected",r->N,r->N);
2806 if (( DDD !=
NULL) && (DD ==
NULL)) DD = DDD;
2807 if (( DDN !=
NULL) && (DN ==
NULL)) DN = DDN;
2815 WerrorS(
"Incorrect input : non-constants are not allowed as coefficients (first argument)");
2823 WerrorS(
"Incorrect input : zero coefficients are not allowed");
2835 IsSkewConstant =
true;
2837 C =
mpNew(r->N,r->N);
2840 for(
i=1;
i<r->N;
i++)
2841 for(
j=
i+1;
j<=r->N;
j++)
2849 if ( (CN ==
NULL) && (CC !=
NULL) )
2859 if (!pN_set)
n_Delete(&pN,curr->cf);
2864 tmpIsSkewConstant =
true;
2866 for(
i=1;
i<r->N;
i++)
2867 for(
j=
i+1;
j<=r->N;
j++)
2875 Werror(
"Incorrect input : non-constants are not allowed as coefficients (first argument at [%d, %d])",
i,
j);
2886 WerrorS(
"Incorrect input : matrix of coefficients contains zeros in the upper triangle");
2893 if (!
n_Equal(pN, qN, curr->cf)) tmpIsSkewConstant =
false;
2907 IsSkewConstant = tmpIsSkewConstant;
2909 if ( tmpIsSkewConstant &&
n_IsOne(pN, curr->cf) )
2913 if (!pN_set)
n_Delete(&pN,curr->cf);
2919 D =
mpNew(r->N,r->N); bDnew =
true;
2929 for(
i=1;
i<r->N;
i++)
2930 for(
j=
i+1;
j<=r->N;
j++)
2940 for(
int i = 1; (
i < r->N) &&
b;
i++)
2941 for(
int j =
i+1; (
j <= r->N) &&
b;
j++)
2972 PrintS(
"nc_CallPlural(), Computed data, C: \n");
2975 PrintS(
"nc_CallPlural(), Computed data, D: \n");
2978 Print(
"\nTemporary: type = %d, IsSkewConstant = %d\n", nctype, IsSkewConstant);
2988 WerrorS(
"Matrix of polynomials violates the ordering condition");
3008 if (r->GetNC() !=
NULL)
3011 WarnS(
"Changing the NC-structure of an existing NC-ring!!!");
3016 r->GetNC() = nc_new;
◆ nc_CheckSubalgebra()
BOOLEAN nc_CheckSubalgebra |
( |
poly |
PolyVar, |
|
|
ring |
r |
|
) |
| |
Definition at line 2567 of file old.gring.cc.
2576 int *ExpVar=(
int*)
omAlloc0((rN+1)*
sizeof(int));
2577 int *ExpTmp=(
int*)
omAlloc0((rN+1)*
sizeof(int));
2579 int i;
int j;
int k;
2582 for (
i=1;
i<rN;
i++)
2586 for (
j=
i+1;
j<=rN;
j++)
2599 if (ExpVar[
k]!=0) OK=0;
◆ nc_CleanUp() [1/2]
◆ nc_CleanUp() [2/2]
void nc_CleanUp |
( |
ring |
r | ) |
|
|
inline |
◆ nc_CreateShortSpoly()
poly nc_CreateShortSpoly |
( |
poly |
p1, |
|
|
poly |
p2, |
|
|
const ring |
r |
|
) |
| |
Definition at line 1878 of file old.gring.cc.
1888 if ((lCompP1!=lCompP2) && (lCompP1!=0) && (lCompP2!=0))
1891 WerrorS(
"nc_CreateShortSpoly: wrong module components!");
1898 #ifdef HAVE_RATGRING
◆ nc_mm_Bracket_nn()
poly nc_mm_Bracket_nn |
( |
poly |
m1, |
|
|
poly |
m2, |
|
|
const ring |
r |
|
) |
| |
returns [m1,m2] for two monoms, destroys nothing without coeffs
Definition at line 2283 of file old.gring.cc.
2288 int *M1=(
int *)
omAlloc0((rN+1)*
sizeof(int));
2289 int *M2=(
int *)
omAlloc0((rN+1)*
sizeof(int));
2290 int *aPREFIX=(
int *)
omAlloc0((rN+1)*
sizeof(int));
2291 int *aSUFFIX=(
int *)
omAlloc0((rN+1)*
sizeof(int));
2313 if (
i<
j) {nMax=
j; nMin=
i;}
else {nMax=
i; nMin=
j;}
2337 memcpy(aSUFFIX, M1,(rN+1)*
sizeof(
int));
2338 memcpy(aPREFIX, M1,(rN+1)*
sizeof(
int));
2339 for (
k=1;
k<=
j;
k++) aSUFFIX[
k]=0;
2340 for (
k=
j;
k<=rN;
k++) aPREFIX[
k]=0;
2362 memcpy(aSUFFIX, M2,(rN+1)*
sizeof(
int));
2363 memcpy(aPREFIX, M2,(rN+1)*
sizeof(
int));
2364 for (
k=1;
k<=
i;
k++) aSUFFIX[
k]=0;
2365 for (
k=
i;
k<=rN;
k++) aPREFIX[
k]=0;
◆ nc_p_Bracket_qq()
poly nc_p_Bracket_qq |
( |
poly |
p, |
|
|
const poly |
q, |
|
|
const ring |
r |
|
) |
| |
◆ nc_p_CopyGet()
poly nc_p_CopyGet |
( |
poly |
a, |
|
|
const ring |
r |
|
) |
| |
◆ nc_p_CopyPut()
poly nc_p_CopyPut |
( |
poly |
a, |
|
|
const ring |
r |
|
) |
| |
◆ nc_p_Minus_mm_Mult_qq()
poly nc_p_Minus_mm_Mult_qq |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const poly |
q, |
|
|
int & |
shorter, |
|
|
const |
poly, |
|
|
const ring |
r |
|
) |
| |
for p_Minus_mm_Mult_qq in pInline2.h
Definition at line 150 of file old.gring.cc.
◆ nc_p_Plus_mm_Mult_qq()
poly nc_p_Plus_mm_Mult_qq |
( |
poly |
p, |
|
|
const poly |
m, |
|
|
const poly |
q, |
|
|
int & |
lp, |
|
|
const int |
, |
|
|
const ring |
r |
|
) |
| |
◆ nc_p_ProcsSet()
void nc_p_ProcsSet |
( |
ring |
rGR, |
|
|
p_Procs_s * |
p_Procs |
|
) |
| |
◆ nc_PolyPolyRed()
void nc_PolyPolyRed |
( |
poly & |
b, |
|
|
poly |
p, |
|
|
number * |
c, |
|
|
const ring |
r |
|
) |
| |
◆ nc_PolyPolyRedNew()
void nc_PolyPolyRedNew |
( |
poly & |
b, |
|
|
poly |
p, |
|
|
number * |
c, |
|
|
const ring |
r |
|
) |
| |
|
inline |
◆ nc_PolyPolyRedOld()
void nc_PolyPolyRedOld |
( |
poly & |
b, |
|
|
poly |
p, |
|
|
number * |
c, |
|
|
const ring |
r |
|
) |
| |
|
inline |
◆ nc_PrintMat()
matrix nc_PrintMat |
( |
int |
a, |
|
|
int |
b, |
|
|
ring |
r, |
|
|
int |
metric |
|
) |
| |
returns matrix with the info on noncomm multiplication
Definition at line 2393 of file old.gring.cc.
2399 if (a>
b) {
j=
b;
i=a;}
2425 for(t=1;t<=
size;t++)
2444 totdeg=totdeg+
p_Deg(
p,r);
2447 number ntd =
n_Init(totdeg, r->cf);
2449 number nres=
n_Div(ntd,nln, r->cf);
◆ nc_pSubst()
poly nc_pSubst |
( |
poly |
p, |
|
|
int |
n, |
|
|
poly |
e, |
|
|
const ring |
r |
|
) |
| |
substitute the n-th variable by e in p destroy p e is not a constant
Definition at line 3228 of file old.gring.cc.
3231 int *PRE = (
int *)
omAlloc0((rN+1)*
sizeof(int));
3232 int *SUF = (
int *)
omAlloc0((rN+1)*
sizeof(int));
3242 pow = PRE[n]; PRE[n]=0;
3246 for (
i=n+1;
i<=rN;
i++)
◆ nc_rCleanUp()
void nc_rCleanUp |
( |
ring |
r | ) |
|
◆ nc_rCopy()
bool nc_rCopy |
( |
ring |
res, |
|
|
const ring |
r, |
|
|
bool |
bSetupQuotient |
|
) |
| |
Definition at line 3028 of file old.gring.cc.
3032 WarnS(
"Error occurred while coping/setuping the NC structure!");
◆ nc_rCreateNCcomm()
ring nc_rCreateNCcomm |
( |
ring |
r | ) |
|
Definition at line 3279 of file old.gring.cc.
3288 for(
int i=1;
i<rr->N;
i++)
3289 for(
int j=
i+1;
j<=rr->N;
j++)
3293 WarnS(
"Error initializing multiplication!");
◆ nc_rKill()
complete destructor
Definition at line 2474 of file old.gring.cc.
2477 if( r->GetNC()->GetGlobalMultiplier() !=
NULL )
2479 delete r->GetNC()->GetGlobalMultiplier();
2480 r->GetNC()->GetGlobalMultiplier() =
NULL;
2483 if( r->GetNC()->GetFormulaPowerMultiplier() !=
NULL )
2485 delete r->GetNC()->GetFormulaPowerMultiplier();
2486 r->GetNC()->GetFormulaPowerMultiplier() =
NULL;
2496 for(
j=
i+1;
j<=rN;
j++)
2503 id_Delete((ideal *)&(r->GetNC()->COM),r);
2508 if(
rIsSCA(r) && (r->GetNC()->SCAQuotient() !=
NULL) )
2510 id_Delete(&r->GetNC()->SCAQuotient(), r);
◆ nc_SetupQuotient()
bool nc_SetupQuotient |
( |
ring |
rGR, |
|
|
const ring |
rG, |
|
|
bool |
bCopy |
|
) |
| |
◆ ncExtensions()
bool ncExtensions |
( |
int |
iMask | ) |
|
◆ NF_Proc_Dummy()
static poly NF_Proc_Dummy |
( |
ideal |
, |
|
|
ideal |
, |
|
|
poly |
, |
|
|
int |
, |
|
|
int |
, |
|
|
const |
ring |
|
) |
| |
|
static |
◆ p_CopyEmbed()
poly p_CopyEmbed |
( |
poly |
p, |
|
|
ring |
srcRing, |
|
|
int |
shift, |
|
|
int |
, |
|
|
ring |
dstRing |
|
) |
| |
Definition at line 3303 of file old.gring.cc.
3305 if (dstRing == srcRing)
3317 int *perm = (
int *)
omAlloc0((
rVar(srcRing)+1)*
sizeof(int));
3318 int *par_perm = (
int *)
omAlloc0((
rPar(srcRing)+1)*
sizeof(
int));
3326 if ((shift<0) || (shift >
rVar(srcRing)))
3328 WerrorS(
"bad shifts in p_CopyEmbed");
3331 for (
i=1;
i<= srcRing->N;
i++)
3335 q =
p_PermPoly(
p,perm,srcRing, dstRing, nMap,par_perm,
rPar(srcRing));
◆ pOppose()
poly pOppose |
( |
ring |
Rop, |
|
|
poly |
p, |
|
|
const ring |
dst |
|
) |
| |
opposes a vector p from Rop to currRing (dst!)
Definition at line 3367 of file old.gring.cc.
3370 if ( Rop == dst )
return(
p_Copy(
p, dst));
3376 WarnS(
"an opposite ring should be used");
3387 int *perm=(
int *)
omAlloc0((Rop->N+1)*
sizeof(int));
3392 for(
i=1;
i<=Rop->N;
i++)
3394 perm[
i] = Rop->N+1-
i;
◆ rIsLikeOpposite()
BOOLEAN rIsLikeOpposite |
( |
ring |
rBase, |
|
|
ring |
rCandidate |
|
) |
| |
checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so
Definition at line 3340 of file old.gring.cc.
3343 int diagnose =
TRUE;
3351 if (rBase->N != rCandidate->N) diagnose =
FALSE;
◆ setNCExtensions()
int setNCExtensions |
( |
int |
iMask | ) |
|
◆ gnc_gr_bba
◆ gnc_gr_mora
◆ iNCExtensions
◆ nc_NF
◆ sca_bba
◆ sca_gr_bba
◆ sca_mora
poly nc_mm_Bracket_nn(poly m1, poly m2, const ring r)
returns [m1,m2] for two monoms, destroys nothing without coeffs
int dReportError(const char *fmt,...)
poly gnc_ReduceSpolyNew(const poly p1, poly p2, const ring r)
poly gnc_CreateSpolyOld(const poly p1, const poly p2, const ring r)
BOOLEAN ncInitSpecialPairMultiplication(ring r)
static poly p_LmDeleteAndNext(poly p, const ring r)
poly pOppose(ring Rop, poly p, const ring dst)
opposes a vector p from Rop to currRing (dst!)
poly p_LcmRat(const poly a, const poly b, const long lCompM, const ring r)
poly gnc_p_Mult_mm_Common(poly p, const poly m, int side, const ring r)
void * cast_A_to_vptr(A a)
void p_Write0(poly p, ring lmRing, ring tailRing)
poly gnc_mm_Mult_p(const poly m, poly p, const ring r)
static void p_ExpVectorDiff(poly pr, poly p1, poly p2, const ring r)
#define MATELEM(mat, i, j)
const CanonicalForm int const CFList const Variable & y
bool ncExtensions(int iMask)
void p_DebugPrint(poly p, const ring r)
poly gnc_p_Mult_mm(poly p, const poly m, const ring r)
poly nc_p_CopyPut(poly a, const ring r)
static poly p_Head(poly p, const ring r)
static poly p_Mult_mm(poly p, poly m, const ring r)
#define MIN_LENGTH_BUCKET
BOOLEAN p_ComparePolys(poly p1, poly p2, const ring r)
returns TRUE if p1 is a skalar multiple of p2 assume p1 != NULL and p2 != NULL
static nc_type & ncRingType(nc_struct *p)
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
void gnc_kBucketPolyRedNew(kBucket_pt b, poly p, number *c)
static poly p_Neg(poly p, const ring r)
static void p_SetCompP(poly p, int i, ring r)
void gnc_kBucketPolyRed_ZNew(kBucket_pt b, poly p, number *c)
static BOOLEAN length(leftv result, leftv arg)
BOOLEAN pqLength(poly p, poly q, int &lp, int &lq, const int min)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static poly pp_Mult_mm(poly p, poly m, const ring r)
const poly kBucketGetLm(kBucket_pt bucket)
poly gnc_uu_Mult_ww_vert(int i, int a, int j, int b, const ring r)
const CanonicalForm CFMap CFMap & N
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
BOOLEAN p_HasNotCF(poly p1, poly p2, const ring r)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
poly nc_p_Bracket_qq(poly p, const poly q, const ring r)
returns [p,q], destroys p
#define __p_Mult_nn(p, n, r)
void p_Lcm(const poly a, const poly b, poly m, const ring r)
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces)
set spaces to zero by default
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
void nc_rKill(ring r)
complete destructor
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static unsigned pLength(poly a)
static void p_SetExpV(poly p, int *ev, const ring r)
BOOLEAN gnc_InitMultiplication(ring r, bool bSetupQuotient=false)
static poly p_Copy(poly p, const ring r)
returns a copy of p
poly p_Power(poly p, int i, const ring r)
void nc_PolyPolyRedOld(poly &b, poly p, number *c, const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
poly gnc_mm_Mult_uu(int *F, int jG, int bG, const ring r)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
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)
void kBucket_Add_q(kBucket_pt bucket, poly q, int *l)
Add to Bucket a poly ,i.e. Bpoly == q+Bpoly.
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
#define TEST_OPT_NOT_BUCKETS
void PrintS(const char *s)
#define omFreeSize(addr, size)
poly nc_p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &shorter, const poly, const ring r)
for p_Minus_mm_Mult_qq in pInline2.h
BOOLEAN kbTest(kBucket_pt bucket)
Tests.
void sca_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
static BOOLEAN rIsRatGRing(const ring r)
static void p_LmDelete(poly p, const ring r)
void p_Write(poly p, ring lmRing, ring tailRing)
poly p_Cleardenom(poly p, const ring r)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
static int rPar(const ring r)
(r->cf->P)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static BOOLEAN p_DivisibleBy(poly a, poly b, const ring r)
poly gnc_pp_Mult_mm(const poly p, const poly m, const ring r, poly &last)
static void p_GetExpV(poly p, int *ev, const ring r)
poly gnc_uu_Mult_ww(int i, int a, int j, int b, const ring r)
static int p_LmCmp(poly p, poly q, const ring r)
void mp_Delete(matrix *a, const ring r)
static poly nc_mm_Mult_p(const poly m, poly p, const ring r)
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
matrix mpNew(int r, int c)
create a r x c zero-matrix
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
#define UPMATELEM(i, j, nVar)
static void p_LmFree(poly p, ring)
bool nc_SetupQuotient(ring rGR, const ring rG, bool bCopy)
long p_Deg(poly a, const ring r)
static void p_Delete(poly *p, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
static FORCE_INLINE number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
void gnc_kBucketPolyRed_ZOld(kBucket_pt b, poly p, number *c)
static int si_max(const int a, const int b)
gmp_float log(const gmp_float &a)
BOOLEAN rIsLikeOpposite(ring rBase, ring rCandidate)
checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so
static void gnc_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
BOOLEAN gnc_CheckOrdCondition(matrix D, ring r)
poly nc_p_CopyGet(poly a, const ring r)
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
void Werror(const char *fmt,...)
ideal idInit(int idsize, int rank)
initialise an ideal / module
void nc_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
static number p_SetCoeff(poly p, number n, ring r)
static FORCE_INLINE BOOLEAN n_IsMOne(number n, const coeffs r)
TRUE iff 'n' represents the additive inverse of the one element, i.e. -1.
poly gnc_mm_Mult_pp(const poly m, const poly p, const ring r)
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Rational pow(const Rational &a, int e)
void WerrorS(const char *s)
static long p_AddExp(poly p, int v, long ee, ring r)
static poly nc_mm_Mult_pp(const poly m, const poly p, const ring r)
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
static void p_Setm(poly p, const ring r)
void nc_PolyPolyRedNew(poly &b, poly p, number *c, const ring r)
const Variable & v
< [in] a sqrfree bivariate poly
BOOLEAN rSamePolyRep(ring r1, ring r2)
returns TRUE, if r1 and r2 represents the monomials in the same way FALSE, otherwise this is an analo...
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
static BOOLEAN p_IsConstantPoly(const poly p, const ring r)
static BOOLEAN p_IsConstant(const poly p, const ring r)
const CanonicalForm int s
poly gnc_CreateSpolyNew(const poly p1, const poly p2, const ring r)
poly gnc_mm_Mult_nn(int *F, int *G, const ring r)
void gnc_kBucketPolyRedOld(kBucket_pt b, poly p, number *c)
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
BOOLEAN nc_CallPlural(matrix CCC, matrix DDD, poly CCN, poly DDN, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring)
returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type,...
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
ideal id_Copy(ideal h1, const ring r)
copy an ideal
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
CFArray copy(const CFList &list)
write elements of list into an array
poly prCopyR_NoSort(poly p, ring src_r, ring dest_r)
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
static bool rIsSCA(const ring r)
static poly gnc_uu_Mult_ww_formula(int i, int a, int j, int b, const ring r)
bool sca_SetupQuotient(ring rGR, ring rG, bool bCopy)
CPolynomialSummator: unifies bucket and polynomial summation as the later is brocken in buckets :(.
static p_Procs_s * _p_procs
void nc_CleanUp(nc_struct *p)
static BOOLEAN p_LmIsConstant(const poly p, const ring r)
poly gnc_ReduceSpolyOld(const poly p1, poly p2, const ring r)
void p_Cleardenom_n(poly ph, const ring r, number &c)