 |
My Project
debian-1:4.1.1-p2+ds-4build3
|
Go to the source code of this file.
|
#define | UPMATELEM(i, j, nVar) ( (nVar * ((i)-1) - ((i) * ((i)-1))/2 + (j)-1)-(i) ) |
|
|
typedef poly(* | mm_Mult_p_Proc_Ptr) (const poly m, poly p, const ring r) |
|
typedef poly(* | mm_Mult_pp_Proc_Ptr) (const poly m, const poly p, const ring r) |
|
typedef poly(* | SPoly_Proc_Ptr) (const poly p1, const poly p2, const ring r) |
|
typedef poly(* | SPolyReduce_Proc_Ptr) (const poly p1, poly p2, const ring r) |
|
typedef void(* | bucket_Proc_Ptr) (kBucket_pt b, poly p, number *c) |
|
|
matrix | nc_PrintMat (int a, int b, ring r, int metric) |
| returns matrix with the info on noncomm multiplication More...
|
|
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...
|
|
void | nc_rKill (ring r) |
| complete destructor More...
|
|
BOOLEAN | nc_CheckSubalgebra (poly PolyVar, ring r) |
|
static nc_struct *& | GetNC (ring r) |
|
static nc_type & | ncRingType (nc_struct *p) |
|
static nc_type | ncRingType (ring r) |
|
static void | ncRingType (ring r, nc_type t) |
|
static void | ncRingType (nc_struct *p, nc_type t) |
|
static bool | rIsSCA (const ring r) |
|
poly | _nc_p_Mult_q (poly p, poly q, const ring r) |
| general NC-multiplication with destruction More...
|
|
poly | _nc_pp_Mult_qq (const poly p, const poly q, const ring r) |
| general NC-multiplication without destruction More...
|
|
poly | nc_p_Minus_mm_Mult_qq (poly p, const poly m, const poly q, int &lp, 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) |
|
static poly | nc_mm_Mult_pp (const poly m, const poly p, const ring r) |
|
static poly | nc_mm_Mult_p (const poly m, poly p, const ring r) |
|
static poly | nc_CreateSpoly (const poly p1, const poly p2, const ring r) |
|
poly | nc_CreateShortSpoly (poly p1, poly p2, const ring r) |
|
poly | nc_p_Bracket_qq (poly p, const poly q, const ring r) |
| returns [p,q], destroys p More...
|
|
static poly | nc_ReduceSpoly (const poly p1, poly p2, const ring r) |
|
void | nc_PolyPolyRed (poly &b, poly p, number *c, const ring r) |
|
static void | nc_kBucketPolyRed (kBucket_pt b, poly p, number *c) |
|
static void | nc_BucketPolyRed_Z (kBucket_pt b, poly p, number *c) |
|
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...
|
|
BOOLEAN | nc_CallPlural (matrix cc, matrix dd, poly cn, poly dn, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring=false) |
| 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_SetupQuotient (ring rGR, const ring rG=NULL, bool bCopy=false) |
|
BOOLEAN | nc_rComplete (const ring src, ring dest, bool bSetupQuotient=true) |
|
bool | nc_rCopy (ring res, const ring r, bool bSetupQuotient) |
|
poly | pOppose (ring Rop_src, poly p, const ring Rop_dst) |
| opposes a vector p from Rop to currRing (dst!) More...
|
|
ideal | idOppose (ring Rop_src, ideal I, const ring Rop_dst) |
| opposes a module I from Rop to currRing(dst) More...
|
|
int & | getNCExtensions () |
|
int | setNCExtensions (int iMask) |
|
bool | ncExtensions (int iMask) |
|
void | nc_p_ProcsSet (ring rGR, p_Procs_s *p_Procs) |
|
static poly | GetC (const ring r, int i, int j) |
|
static poly | GetD (const ring r, int i, int j) |
|
◆ nc_pProcs
Definition at line 55 of file nc.h.
◆ UPMATELEM
#define UPMATELEM |
( |
|
i, |
|
|
|
j, |
|
|
|
nVar |
|
) |
| ( (nVar * ((i)-1) - ((i) * ((i)-1))/2 + (j)-1)-(i) ) |
Definition at line 37 of file nc.h.
◆ bucket_Proc_Ptr
typedef void(* bucket_Proc_Ptr) (kBucket_pt b, poly p, number *c) |
Definition at line 53 of file nc.h.
◆ mm_Mult_p_Proc_Ptr
typedef poly(* mm_Mult_p_Proc_Ptr) (const poly m, poly p, const ring r) |
Definition at line 45 of file nc.h.
◆ mm_Mult_pp_Proc_Ptr
Definition at line 46 of file nc.h.
◆ SPoly_Proc_Ptr
typedef poly(* SPoly_Proc_Ptr) (const poly p1, const poly p2, const ring r) |
Definition at line 50 of file nc.h.
◆ SPolyReduce_Proc_Ptr
typedef poly(* SPolyReduce_Proc_Ptr) (const poly p1, poly p2, const ring r) |
Definition at line 51 of file nc.h.
◆ nc_type
Enumerator |
---|
nc_error | |
nc_general | |
nc_skew | |
nc_comm | |
nc_lie | |
nc_undef | |
nc_exterior | |
Definition at line 12 of file nc.h.
◆ _nc_p_Mult_q()
poly _nc_p_Mult_q |
( |
poly |
p, |
|
|
poly |
q, |
|
|
const ring |
r |
|
) |
| |
general NC-multiplication with destruction
Definition at line 215 of file old.gring.cc.
◆ _nc_pp_Mult_qq()
general NC-multiplication without destruction
Definition at line 254 of file old.gring.cc.
276 for( poly q = pPolyQ; q !=
NULL; q =
pNext(q) )
◆ GetC()
static poly GetC |
( |
const ring |
r, |
|
|
int |
i, |
|
|
int |
j |
|
) |
| |
|
inlinestatic |
Definition at line 375 of file nc.h.
382 return ( C->
m[
ncols * ((
i)-1) + (
j)-1] );
◆ GetD()
static poly GetD |
( |
const ring |
r, |
|
|
int |
i, |
|
|
int |
j |
|
) |
| |
|
inlinestatic |
Definition at line 386 of file nc.h.
391 const int ncols =
D->ncols;
393 return (
D->m[
ncols * ((
i)-1) + (
j)-1] );
◆ GetNC()
Definition at line 162 of file nc.h.
◆ getNCExtensions()
◆ idOppose()
ideal idOppose |
( |
ring |
Rop_src, |
|
|
ideal |
I, |
|
|
const ring |
Rop_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_BucketPolyRed_Z()
static void nc_BucketPolyRed_Z |
( |
kBucket_pt |
b, |
|
|
poly |
p, |
|
|
number * |
c |
|
) |
| |
|
inlinestatic |
Definition at line 295 of file nc.h.
297 const ring r =
b->bucket_ring;
302 assume(r->GetNC()->p_Procs.BucketPolyRed_Z!=
NULL);
303 return r->GetNC()->p_Procs.BucketPolyRed_Z(
b,
p, c);
◆ nc_CallPlural()
BOOLEAN nc_CallPlural |
( |
matrix |
cc, |
|
|
matrix |
dd, |
|
|
poly |
cn, |
|
|
poly |
dn, |
|
|
ring |
r, |
|
|
bool |
bSetupQuotient, |
|
|
bool |
bCopyInput, |
|
|
bool |
bBeQuiet, |
|
|
ring |
curr, |
|
|
bool |
dummy_ring = false |
|
) |
| |
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_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_CreateSpoly()
Definition at line 250 of file nc.h.
254 return r->GetNC()->p_Procs.SPoly(p1, p2, r);
◆ nc_kBucketPolyRed()
static void nc_kBucketPolyRed |
( |
kBucket_pt |
b, |
|
|
poly |
p, |
|
|
number * |
c |
|
) |
| |
|
inlinestatic |
Definition at line 284 of file nc.h.
286 const ring r =
b->bucket_ring;
291 assume(r->GetNC()->p_Procs.BucketPolyRed!=
NULL);
292 return r->GetNC()->p_Procs.BucketPolyRed(
b,
p, c);
◆ nc_mm_Mult_p()
static poly nc_mm_Mult_p |
( |
const poly |
m, |
|
|
poly |
p, |
|
|
const ring |
r |
|
) |
| |
|
inlinestatic |
Definition at line 242 of file nc.h.
246 return r->GetNC()->p_Procs.mm_Mult_p(
m,
p, r);
◆ nc_mm_Mult_pp()
Definition at line 232 of file nc.h.
236 return r->GetNC()->p_Procs.mm_Mult_pp(
m,
p, r);
◆ nc_p_Bracket_qq()
poly nc_p_Bracket_qq |
( |
poly |
p, |
|
|
const poly |
q, |
|
|
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 & |
lp, |
|
|
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_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_rComplete()
BOOLEAN nc_rComplete |
( |
const ring |
src, |
|
|
ring |
dest, |
|
|
bool |
bSetupQuotient = true |
|
) |
| |
Definition at line 5520 of file ring.cc.
5537 const int N = dest->N;
5546 const ring srcBase = src;
5553 matrix C0 = src->GetNC()->C;
5554 matrix D0 = src->GetNC()->D;
5557 for (
int i = 1;
i <
N;
i++)
5559 for (
int j =
i + 1;
j <=
N;
j++)
5562 const poly
p =
p_NSet(n, dest);
◆ 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_ReduceSpoly()
static poly nc_ReduceSpoly |
( |
const poly |
p1, |
|
|
poly |
p2, |
|
|
const ring |
r |
|
) |
| |
|
inlinestatic |
Definition at line 263 of file nc.h.
266 assume(r->GetNC()->p_Procs.ReduceSPoly!=
NULL);
270 return r->GetNC()->p_Procs.ReduceSPoly(p1, p2, r);
◆ 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 = NULL , |
|
|
bool |
bCopy = false |
|
) |
| |
◆ ncExtensions()
bool ncExtensions |
( |
int |
iMask | ) |
|
◆ ncRingType() [1/4]
Definition at line 167 of file nc.h.
170 return (
p->ncRingType());
◆ ncRingType() [2/4]
Definition at line 187 of file nc.h.
◆ ncRingType() [3/4]
static nc_type ncRingType |
( |
ring |
r | ) |
|
|
inlinestatic |
Definition at line 173 of file nc.h.
◆ ncRingType() [4/4]
static void ncRingType |
( |
ring |
r, |
|
|
nc_type |
t |
|
) |
| |
|
inlinestatic |
Definition at line 181 of file nc.h.
◆ pOppose()
poly pOppose |
( |
ring |
Rop_src, |
|
|
poly |
p, |
|
|
const ring |
Rop_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;
◆ rIsSCA()
static bool rIsSCA |
( |
const ring |
r | ) |
|
|
inlinestatic |
Definition at line 198 of file nc.h.
◆ setNCExtensions()
int setNCExtensions |
( |
int |
iMask | ) |
|
◆ GENERICMASK
const int GENERICMASK = 0x000 |
Definition at line 332 of file nc.h.
◆ NOCACHEMASK
const int NOCACHEMASK = 0x008 |
Definition at line 349 of file nc.h.
◆ NOFORMULAMASK
const int NOFORMULAMASK =0x004 |
Definition at line 348 of file nc.h.
◆ NOPLURALMASK
const int NOPLURALMASK = 0x002 |
Definition at line 347 of file nc.h.
◆ SCAMASK
const int SCAMASK = 0x001 |
Definition at line 333 of file nc.h.
◆ TESTSYZSCAMASK
Definition at line 351 of file nc.h.
poly nc_mm_Bracket_nn(poly m1, poly m2, const ring r)
returns [m1,m2] for two monoms, destroys nothing without coeffs
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)
#define MATELEM(mat, i, j)
bool ncExtensions(int iMask)
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)
static poly p_Neg(poly p, const ring r)
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 CanonicalForm CFMap CFMap & N
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
#define __p_Mult_nn(p, n, r)
void p_Lcm(const poly a, const poly b, poly m, const ring r)
void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces)
set spaces to zero by default
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)
static poly p_Copy(poly p, const ring r)
returns a copy of p
BOOLEAN gnc_InitMultiplication(ring r, bool bSetupQuotient=false)
poly p_Power(poly p, int i, const ring r)
void nc_PolyPolyRedOld(poly &b, poly p, number *c, const ring r)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
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 TEST_OPT_NOT_BUCKETS
void PrintS(const char *s)
#define omFreeSize(addr, size)
void sca_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
static BOOLEAN rIsRatGRing(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 FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static void p_GetExpV(poly p, int *ev, 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)
matrix mpNew(int r, int c)
create a r x c zero-matrix
#define UPMATELEM(i, j, nVar)
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)
BOOLEAN nc_CallPlural(matrix cc, matrix dd, poly cn, poly dn, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring=false)
returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type,...
static int si_max(const int a, const int b)
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 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
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 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 void p_Setm(poly p, const ring r)
void nc_PolyPolyRedNew(poly &b, poly p, number *c, const ring r)
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
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
static nc_struct *& GetNC(ring r)
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
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)
bool sca_SetupQuotient(ring rGR, ring rG, bool bCopy)
CPolynomialSummator: unifies bucket and polynomial summation as the later is brocken in buckets :(.
poly prCopyR(poly p, ring src_r, ring dest_r)
void nc_CleanUp(nc_struct *p)