 |
My Project
debian-1:4.1.2-p1+ds-2
|
Go to the source code of this file.
|
static poly | mp_Exdiv (poly m, poly d, poly vars, const ring) |
|
static poly | mp_Select (poly fro, poly what, const ring) |
|
static poly | mp_SelectId (ideal I, poly what, const ring R) |
|
matrix | mpNew (int r, int c) |
| create a r x c zero-matrix More...
|
|
matrix | mp_Copy (matrix a, const ring r) |
| copies matrix a (from ring r to r) More...
|
|
matrix | mp_Copy (const matrix a, const ring rSrc, const ring rDst) |
| copies matrix a from rSrc into rDst More...
|
|
matrix | mp_InitP (int r, int c, poly p, const ring R) |
| make it a p * unit matrix More...
|
|
matrix | mp_InitI (int r, int c, int v, const ring R) |
| make it a v * unit matrix More...
|
|
matrix | mp_MultI (matrix a, int f, const ring R) |
| c = f*a More...
|
|
matrix | mp_MultP (matrix a, poly p, const ring R) |
| multiply a matrix 'a' by a poly 'p', destroy the args More...
|
|
matrix | pMultMp (poly p, matrix a, const ring R) |
|
matrix | mp_Add (matrix a, matrix b, const ring R) |
|
matrix | mp_Sub (matrix a, matrix b, const ring R) |
|
matrix | mp_Mult (matrix a, matrix b, const ring R) |
|
matrix | mp_Transp (matrix a, const ring R) |
|
poly | mp_Trace (matrix a, const ring R) |
|
poly | TraceOfProd (matrix a, matrix b, int n, const ring R) |
|
matrix | mp_Coeffs (ideal I, int var, const ring R) |
| corresponds to Maple's coeffs: var has to be the number of a variable More...
|
|
void | mp_Monomials (matrix c, int r, int var, matrix m, const ring R) |
|
matrix | mp_CoeffProc (poly f, poly vars, const ring R) |
|
matrix | mp_CoeffProcId (ideal I, poly vars, const ring R) |
|
void | mp_Coef2 (poly v, poly mon, matrix *c, matrix *m, const ring R) |
| corresponds to Macauley's coef: the exponent vector of vars has to contain the variables, eg 'xy'; then the poly f is searched for monomials in x and y, these monimials are written to the first row of the matrix co. the second row of co contains the respective factors in f. Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2. More...
|
|
int | mp_Compare (matrix a, matrix b, const ring R) |
|
BOOLEAN | mp_Equal (matrix a, matrix b, const ring R) |
|
static poly | p_Insert (poly p1, poly p2, const ring R) |
|
static void | mp_PartClean (matrix a, int lr, int lc, const ring R) |
|
BOOLEAN | mp_IsDiagUnit (matrix U, const ring R) |
|
void | iiWriteMatrix (matrix im, const char *n, int dim, const ring r, int spaces) |
| set spaces to zero by default More...
|
|
char * | iiStringMatrix (matrix im, int dim, const ring r, char ch) |
|
void | mp_Delete (matrix *a, const ring r) |
|
static float | mp_PolyWeight (poly p, const ring r) |
|
static void | mpReplace (int j, int n, int &sign, int *perm) |
|
static int | mp_PivBar (matrix a, int lr, int lc, const ring r) |
|
static void | mpSwapRow (matrix a, int pos, int lr, int lc) |
|
static int | mp_PrepareRow (matrix a, int lr, int lc, const ring R) |
|
static int | mp_PivRow (matrix a, int lr, int lc, const ring r) |
|
static void | mpSwapCol (matrix a, int pos, int lr, int lc) |
|
static int | mp_PreparePiv (matrix a, int lr, int lc, const ring r) |
|
static void | mp_ElimBar (matrix a0, matrix re, poly div, int lr, int lc, const ring R) |
|
void | mp_MinorToResult (ideal result, int &elems, matrix a, int r, int c, ideal R, const ring) |
| entries of a are minors and go to result (only if not in R) More...
|
|
static void | mpFinalClean (matrix a) |
|
void | mp_RecMin (int ar, ideal result, int &elems, matrix a, int lr, int lc, poly barDiv, ideal R, const ring r) |
| produces recursively the ideal of all arxar-minors of a More...
|
|
poly | mp_DetBareiss (matrix a, const ring r) |
| returns the determinant of the matrix m; uses Bareiss algorithm More...
|
|
matrix | mp_Wedge (matrix a, int ar, const ring R) |
|
static ideal | sm_MultAndShift (poly f, ideal B, int s, const ring r) |
|
static void | sm_AddSubMat (ideal res, ideal sm, int col, const ring r) |
|
ideal | sm_Tensor (ideal A, ideal B, const ring r) |
|
ideal | sm_Add (ideal a, ideal b, const ring R) |
|
ideal | sm_Sub (ideal a, ideal b, const ring R) |
|
ideal | sm_Mult (ideal a, ideal b, const ring R) |
|
ideal | sm_Flatten (ideal a, const ring R) |
|
ideal | sm_UnFlatten (ideal a, int col, const ring R) |
|
poly | sm_Trace (ideal a, const ring R) |
|
int | sm_Compare (ideal a, ideal b, const ring R) |
|
BOOLEAN | sm_Equal (ideal a, ideal b, const ring R) |
|
static matrix | mu (matrix A, const ring R) |
|
poly | mp_DetMu (matrix A, const ring R) |
|
DetVariant | mp_GetAlgorithmDet (matrix m, const ring r) |
|
DetVariant | mp_GetAlgorithmDet (const char *s) |
|
poly | mp_Det (matrix a, const ring r, DetVariant d) |
|
poly | sm_Det (ideal a, const ring r, DetVariant d) |
|
◆ iiStringMatrix()
char* iiStringMatrix |
( |
matrix |
im, |
|
|
int |
dim, |
|
|
const ring |
r, |
|
|
char |
ch |
|
) |
| |
◆ iiWriteMatrix()
void iiWriteMatrix |
( |
matrix |
im, |
|
|
const char * |
n, |
|
|
int |
dim, |
|
|
const ring |
r, |
|
|
int |
spaces |
|
) |
| |
set spaces to zero by default
Definition at line 833 of file matpol.cc.
840 for (
i=0;
i<=ii;
i++)
842 for (
j=0;
j<=jj;
j++)
845 Print(
"%-*.*s",spaces,spaces,
" ");
847 else if (
dim == 1)
Print(
"%s[%u]=",n,
j+1);
◆ mp_Add()
Definition at line 178 of file matpol.cc.
182 if ((n !=
b->nrows) || (
m !=
b->ncols))
191 for (
k=
m*n-1;
k>=0;
k--)
◆ mp_Coef2()
corresponds to Macauley's coef: the exponent vector of vars has to contain the variables, eg 'xy'; then the poly f is searched for monomials in x and y, these monimials are written to the first row of the matrix co. the second row of co contains the respective factors in f. Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2.
Definition at line 580 of file matpol.cc.
◆ mp_CoeffProc()
matrix mp_CoeffProc |
( |
poly |
f, |
|
|
poly |
vars, |
|
|
const ring |
R |
|
) |
| |
◆ mp_CoeffProcId()
matrix mp_CoeffProcId |
( |
ideal |
I, |
|
|
poly |
vars, |
|
|
const ring |
R |
|
) |
| |
◆ mp_Coeffs()
corresponds to Maple's coeffs: var has to be the number of a variable
Definition at line 312 of file matpol.cc.
◆ mp_Compare()
◆ mp_Copy() [1/2]
copies matrix a from rSrc into rDst
Definition at line 84 of file matpol.cc.
94 for (
i=
m*n-1;
i>=0;
i--)
◆ mp_Copy() [2/2]
copies matrix a (from ring r to r)
Definition at line 63 of file matpol.cc.
71 for (
i=
m*n-1;
i>=0;
i--)
◆ mp_Delete()
◆ mp_Det()
◆ mp_DetBareiss()
returns the determinant of the matrix m; uses Bareiss algorithm
Definition at line 1675 of file matpol.cc.
◆ mp_DetMu()
◆ mp_ElimBar()
static void mp_ElimBar |
( |
matrix |
a0, |
|
|
matrix |
re, |
|
|
poly |
div, |
|
|
int |
lr, |
|
|
int |
lc, |
|
|
const ring |
R |
|
) |
| |
|
static |
Definition at line 1448 of file matpol.cc.
1452 poly *
b = a0->
m, *
x = re->
m;
1453 poly piv, elim, q1, *
ap, *a, *q;
1458 for(
j=c-1;
j>=0;
j--)
1460 for(
i=r-1;
i>=0;
i--)
1467 for (
j=c-1;
j>=0;
j--)
1491 for (
j=c-1;
j>=0;
j--)
◆ mp_Equal()
◆ mp_Exdiv()
static poly mp_Exdiv |
( |
poly |
m, |
|
|
poly |
d, |
|
|
poly |
vars, |
|
|
const ring |
R |
|
) |
| |
|
static |
◆ mp_GetAlgorithmDet() [1/2]
Definition at line 2130 of file matpol.cc.
2136 if (strcmp(
s,
"Mu")==0)
return DetMu;
2138 WarnS(
"unknown method for det");
◆ mp_GetAlgorithmDet() [2/2]
◆ mp_InitI()
make it a v * unit matrix
Definition at line 128 of file matpol.cc.
◆ mp_InitP()
make it a p * unit matrix
Definition at line 112 of file matpol.cc.
116 int i=
si_min(r,c), n = c*(
i-1)+
i-1, inc = c+1;
◆ mp_IsDiagUnit()
◆ mp_MinorToResult()
void mp_MinorToResult |
( |
ideal |
result, |
|
|
int & |
elems, |
|
|
matrix |
a, |
|
|
int |
r, |
|
|
int |
c, |
|
|
ideal |
R, |
|
|
const |
ring |
|
) |
| |
entries of a are minors and go to result (only if not in R)
Definition at line 1506 of file matpol.cc.
1516 for (
i=r-1;
i>=0;
i--)
1525 for (
i=r-1;
i>=0;
i--)
◆ mp_Monomials()
◆ mp_Mult()
◆ mp_MultI()
◆ mp_MultP()
multiply a matrix 'a' by a poly 'p', destroy the args
Definition at line 147 of file matpol.cc.
153 for (
k=
m*n-1;
k>0;
k--)
◆ mp_PartClean()
static void mp_PartClean |
( |
matrix |
a, |
|
|
int |
lr, |
|
|
int |
lc, |
|
|
const ring |
R |
|
) |
| |
|
static |
◆ mp_PivBar()
static int mp_PivBar |
( |
matrix |
a, |
|
|
int |
lr, |
|
|
int |
lc, |
|
|
const ring |
r |
|
) |
| |
|
static |
Definition at line 1333 of file matpol.cc.
1342 for (
i=lr-1;
i>=0;
i--)
1351 if ((f2!=0.0) && (f2<f1))
◆ mp_PivRow()
static int mp_PivRow |
( |
matrix |
a, |
|
|
int |
lr, |
|
|
int |
lc, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ mp_PolyWeight()
static float mp_PolyWeight |
( |
poly |
p, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ mp_PreparePiv()
static int mp_PreparePiv |
( |
matrix |
a, |
|
|
int |
lr, |
|
|
int |
lc, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ mp_PrepareRow()
static int mp_PrepareRow |
( |
matrix |
a, |
|
|
int |
lr, |
|
|
int |
lc, |
|
|
const ring |
R |
|
) |
| |
|
static |
◆ mp_RecMin()
void mp_RecMin |
( |
int |
ar, |
|
|
ideal |
result, |
|
|
int & |
elems, |
|
|
matrix |
a, |
|
|
int |
lr, |
|
|
int |
lc, |
|
|
poly |
barDiv, |
|
|
ideal |
R, |
|
|
const ring |
r |
|
) |
| |
produces recursively the ideal of all arxar-minors of a
for minors with Bareiss
Definition at line 1602 of file matpol.cc.
1607 int kr=lr-1,kc=
lc-1;
◆ mp_Select()
static poly mp_Select |
( |
poly |
fro, |
|
|
poly |
what, |
|
|
const ring |
R |
|
) |
| |
|
static |
◆ mp_SelectId()
static poly mp_SelectId |
( |
ideal |
I, |
|
|
poly |
what, |
|
|
const ring |
R |
|
) |
| |
|
static |
◆ mp_Sub()
Definition at line 195 of file matpol.cc.
199 if ((n !=
b->nrows) || (
m !=
b->ncols))
208 for (
k=
m*n-1;
k>=0;
k--)
◆ mp_Trace()
◆ mp_Transp()
◆ mp_Wedge()
Definition at line 1750 of file matpol.cc.
1754 int *rowchoise,*colchoise;
1763 rowchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1764 colchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1775 for (
i=1;
i<=ar;
i++)
1777 for (
j=1;
j<=ar;
j++)
1793 for (
i=1;
i<=ar;
i++)
◆ mpFinalClean()
static void mpFinalClean |
( |
matrix |
a | ) |
|
|
static |
◆ mpNew()
create a r x c zero-matrix
Definition at line 36 of file matpol.cc.
52 size_t s=((size_t)r)*((size_t)c)*
sizeof(poly);
◆ mpReplace()
static void mpReplace |
( |
int |
j, |
|
|
int |
n, |
|
|
int & |
sign, |
|
|
int * |
perm |
|
) |
| |
|
static |
◆ mpSwapCol()
static void mpSwapCol |
( |
matrix |
a, |
|
|
int |
pos, |
|
|
int |
lr, |
|
|
int |
lc |
|
) |
| |
|
static |
Definition at line 1418 of file matpol.cc.
1424 poly* a1 = &a2[pos-1];
◆ mpSwapRow()
static void mpSwapRow |
( |
matrix |
a, |
|
|
int |
pos, |
|
|
int |
lr, |
|
|
int |
lc |
|
) |
| |
|
static |
Definition at line 1360 of file matpol.cc.
1366 poly* a1 = &a2[a->
ncols*(pos-1)];
1368 a2 = &a2[a->
ncols*(lr-1)];
1369 for (
j=
lc-1;
j>=0;
j--)
◆ mu()
Definition at line 2030 of file matpol.cc.
2051 for (
int i = n-1;
i >= 0;
i--)
2059 for (
int i = n-1;
i >=0;
i--)
2061 for (
int j =
i+1;
j < n;
j++)
◆ p_Insert()
static poly p_Insert |
( |
poly |
p1, |
|
|
poly |
p2, |
|
|
const ring |
R |
|
) |
| |
|
static |
◆ pMultMp()
◆ sm_Add()
ideal sm_Add |
( |
ideal |
a, |
|
|
ideal |
b, |
|
|
const ring |
R |
|
) |
| |
◆ sm_AddSubMat()
static void sm_AddSubMat |
( |
ideal |
res, |
|
|
ideal |
sm, |
|
|
int |
col, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ sm_Compare()
int sm_Compare |
( |
ideal |
a, |
|
|
ideal |
b, |
|
|
const ring |
R |
|
) |
| |
Definition at line 1982 of file matpol.cc.
1988 if ((a->rank)<(
b->rank))
return -1;
1989 else if ((a->rank)<(
b->rank))
return 1;
◆ sm_Det()
◆ sm_Equal()
◆ sm_Flatten()
ideal sm_Flatten |
( |
ideal |
a, |
|
|
const ring |
R |
|
) |
| |
◆ sm_Mult()
ideal sm_Mult |
( |
ideal |
a, |
|
|
ideal |
b, |
|
|
const ring |
R |
|
) |
| |
◆ sm_MultAndShift()
static ideal sm_MultAndShift |
( |
poly |
f, |
|
|
ideal |
B, |
|
|
int |
s, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ sm_Sub()
ideal sm_Sub |
( |
ideal |
a, |
|
|
ideal |
b, |
|
|
const ring |
R |
|
) |
| |
◆ sm_Tensor()
ideal sm_Tensor |
( |
ideal |
A, |
|
|
ideal |
B, |
|
|
const ring |
r |
|
) |
| |
Definition at line 1830 of file matpol.cc.
1839 poly *a=(poly*)
omAlloc(
m*
sizeof(poly));
1840 for(
int i=0;
i<n;
i++)
1842 memset(a,0,
m*
sizeof(poly));
1844 for(
int j=0;
j<
m;
j++)
◆ sm_Trace()
poly sm_Trace |
( |
ideal |
a, |
|
|
const ring |
R |
|
) |
| |
◆ sm_UnFlatten()
ideal sm_UnFlatten |
( |
ideal |
a, |
|
|
int |
col, |
|
|
const ring |
R |
|
) |
| |
Definition at line 1944 of file matpol.cc.
1949 ||((a->rank % col)!=0))
1951 Werror(
"wrong format: %d x %d for unflatten",(
int)a->rank,
IDELEMS(a));
1954 int row=a->rank/col;
1962 int r=
comp%row;
if (r==0) r=row;
◆ TraceOfProd()
static int si_min(const int a, const int b)
void StringAppendS(const char *st)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
void p_Normalize(poly p, const ring r)
ideal id_Matrix2Module(matrix mat, const ring R)
converts mat to module, destroys mat
void p_Write0(poly p, ring lmRing, ring tailRing)
static int mp_PivBar(matrix a, int lr, int lc, const ring r)
#define MATELEM(mat, i, j)
1-based access to matrix
int mpPivotBareiss(row_col_weight *)
void pEnlargeSet(poly **p, int l, int increment)
static void mp_ElimBar(matrix a0, matrix re, poly div, int lr, int lc, const ring R)
static poly mp_SelectId(ideal I, poly what, const ring R)
static poly p_Head(poly p, const ring r)
copy the i(leading) term of p
poly singclap_det(const matrix m, const ring s)
static poly p_Neg(poly p, const ring r)
static poly mp_Select(poly fro, poly what, const ring)
static poly mp_Exdiv(poly m, poly d, poly vars, const ring)
static int mp_PrepareRow(matrix a, int lr, int lc, const ring R)
matrix mp_InitP(int r, int c, poly p, const ring R)
make it a p * unit matrix
void idGetNextChoise(int r, int end, BOOLEAN *endch, int *choise)
#define __p_GetComp(p, r)
void mp_RecMin(int ar, ideal result, int &elems, matrix a, int lr, int lc, poly barDiv, ideal R, const ring r)
produces recursively the ideal of all arxar-minors of a
#define SMATELEM(A, i, j, R)
static void mp_PartClean(matrix a, int lr, int lc, const ring R)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
static matrix mu(matrix A, const ring R)
static void mpFinalClean(matrix a)
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
static unsigned pLength(poly a)
void mp_MinorToResult(ideal result, int &elems, matrix a, int r, int c, ideal R, const ring)
entries of a are minors and go to result (only if not in R)
static void mpSwapCol(matrix a, int pos, int lr, int lc)
static ideal sm_MultAndShift(poly f, ideal B, int s, const ring r)
static void sm_AddSubMat(ideal res, ideal sm, int col, const ring r)
for(int i=0;i<=n;i++) degsf[i]
static poly p_Copy(poly p, const ring r)
returns a copy of p
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
poly p_Sub(poly p1, poly p2, const ring r)
#define omFreeSize(addr, size)
static int p_Cmp(poly p1, poly p2, ring r)
#define omfreeSize(addr, size)
poly mp_Det(matrix a, const ring r, DetVariant d)
matrix id_Module2Matrix(ideal mod, const ring R)
poly sm_MultDiv(poly a, poly b, const poly c, const ring R)
static int mp_PreparePiv(matrix a, int lr, int lc, const ring r)
static void p_LmDelete(poly p, const ring r)
void p_String0(poly p, ring lmRing, ring tailRing)
print p according to ShortOut in lmRing & tailRing
static poly pp_Mult_qq(poly p, poly q, const ring r)
void p_Write(poly p, ring lmRing, ring tailRing)
int p_Compare(const poly a, const poly b, const ring R)
void sm_SpecialPolyDiv(poly a, poly b, const ring R)
static BOOLEAN p_IsUnit(const poly p, const ring r)
matrix mpNew(int r, int c)
create a r x c zero-matrix
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
static void mpSwapRow(matrix a, int pos, int lr, int lc)
matrix mp_Mult(matrix a, matrix b, 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 p_EqualPolys(poly p1, poly p2, const ring r)
void StringSetS(const char *st)
static int si_max(const int a, const int b)
void Werror(const char *fmt,...)
void idInitChoise(int r, int beg, int end, BOOLEAN *endch, int *choise)
ideal idInit(int idsize, int rank)
initialise an ideal / module
void p_Vec2Polys(poly v, poly **p, int *len, const ring r)
void WerrorS(const char *s)
DetVariant mp_GetAlgorithmDet(matrix m, const ring r)
#define MATELEM0(mat, i, j)
0-based access to matrix
poly mp_DetMu(matrix A, const ring R)
poly sm_CallDet(ideal I, const ring R)
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
static void p_Setm(poly p, const ring r)
poly mp_DetBareiss(matrix a, const ring r)
returns the determinant of the matrix m; uses Bareiss algorithm
const Variable & v
< [in] a sqrfree bivariate poly
static BOOLEAN p_IsConstant(const poly p, const ring r)
void p_Vec2Array(poly v, poly *p, int len, const ring r)
vector to already allocated array (len>=p_MaxComp(v,r))
const CanonicalForm int s
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
int comp(const CanonicalForm &A, const CanonicalForm &B)
compare polynomials
ideal id_Copy(ideal h1, const ring r)
copy an ideal
static poly p_Mult_q(poly p, poly q, const ring r)
static float mp_PolyWeight(poly p, const ring r)
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)
static FORCE_INLINE int n_Size(number n, const coeffs r)
return a non-negative measure for the complexity of n; return 0 only when n represents zero; (used fo...
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
#define omFreeBin(addr, bin)
static poly p_Insert(poly p1, poly p2, const ring R)
static BOOLEAN rField_is_Zp(const ring r)
static int mp_PivRow(matrix a, int lr, int lc, const ring r)
static BOOLEAN rField_is_Q(const ring r)