Changeset 0a3a629 in git
- Timestamp:
- Apr 13, 2011, 7:17:16 PM (13 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 5d9aa6ba0e85f25a68a2cdc034476c3694495b62
- Parents:
- ee33a7ced725d6bd7bcfb344c937981897a8a06a
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-04-13 19:17:16+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:12:32+01:00
- Location:
- libpolys/polys
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/matpol.cc
ree33a7 r0a3a629 90 90 } 91 91 92 /*2 93 *copies matrix a to b 94 */ 95 matrix mpCopy (matrix a) 92 /// copies matrix a to b 93 matrix mpCopy (matrix a, const ring r) 96 94 { 97 95 idTest((ideal)a); -
libpolys/polys/matpol.h
ree33a7 r0a3a629 32 32 33 33 matrix mpNew(int r, int c); 34 static inline matrix mp_New(int r, int c){ return mpNew(r,c); } 35 34 36 // matrix mpCopy(matrix a); 35 void mp Delete(matrix* a, const ring r);36 matrix mp Copy(const matrix a, const ring rSrc, const ring rDst);37 void mp_Delete(matrix* a, const ring r); 38 matrix mp_Copy(const matrix a, const ring rSrc, const ring rDst); 37 39 38 static inline matrix mp_Copy(matrix a, ring r){ return mpCopy(a, r, r); } 40 matrix mp_Copy(matrix a, const ring r); 41 // static inline matrix mp_Copy(matrix a, const ring r){ return mp_Copy(a, r, r); } 39 42 40 matrix mp InitP(int r, int c, poly p);41 matrix mp InitI(int r, int c, int v);42 matrix mp MultI(matrix a, int f);43 matrix mp MultP(matrix a, poly p);44 matrix pMultMp(poly p, matrix a );45 matrix mp Add(matrix a, matrix b);46 matrix mp Sub(matrix a, matrix b);47 matrix mp Mult(matrix a, matrix b);48 matrix mp Transp(matrix a);49 BOOLEAN mp Equal(matrix a, matrix b);50 poly mp Trace ( matrix a);51 poly TraceOfProd ( matrix a, matrix b, int n );43 matrix mp_InitP(int r, int c, poly p, const ring R); 44 matrix mp_InitI(int r, int c, int v, const ring R); 45 matrix mp_MultI(matrix a, int f, const ring r); 46 matrix mp_MultP(matrix a, poly p, const ring r); 47 matrix pMultMp(poly p, matrix a, const ring r); 48 matrix mp_Add(matrix a, matrix b, const ring r); 49 matrix mp_Sub(matrix a, matrix b, const ring r); 50 matrix mp_Mult(matrix a, matrix b, const ring r); 51 matrix mp_Transp(matrix a, const ring r); 52 BOOLEAN mp_Equal(matrix a, matrix b, const ring r); 53 poly mp_Trace ( matrix a, const ring r); 54 poly TraceOfProd ( matrix a, matrix b, int n, const ring r); 52 55 53 poly mpDet (matrix m); 54 matrix mpWedge(matrix a, int ar); 56 poly mp_Det (matrix m, const ring r); 57 matrix mp_Wedge(matrix a, int ar, const ring r); 58 55 59 // BOOLEAN mpJacobi(leftv res,leftv a); 56 60 // BOOLEAN mpKoszul(leftv res,leftv b/*in*/, leftv c/*ip*/, leftv id=NULL); 57 poly mp DetBareiss (matrix a);61 poly mp_DetBareiss (matrix a, const ring r); 58 62 59 //matrix mp Homogen(matrix a, int v);63 //matrix mp_Homogen(matrix a, int v, const ring r); 60 64 61 void mpMonomials(matrix c, int r, int var, matrix m); 62 matrix mpCoeffs(ideal I, int var); 63 /* corresponds to Maple's coeffs: 64 *var has to be the number of a variable 65 */ 65 void mp_Monomials(matrix c, int r, int var, matrix m, const ring R); 66 66 67 matrix mpCoeffProc (poly f, poly vars); 68 /* corresponds to Macauley's coef: 69 the exponent vector of vars has to contain the variables, eg 'xy'; 70 then the poly f is searched for monomials in x and y, these monimials 71 are written to the first row of the matrix co. 72 the second row of co contains the respective factors in f. 73 Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2. */ 74 void mpCoef2(poly v, poly vars, matrix *c, matrix *m); 75 /* for minors with Bareiss */ 76 void mpRecMin(int, ideal, int &, matrix, int, int, poly, ideal); 77 void mpMinorToResult(ideal, int &, matrix, int, int, ideal); 67 /// corresponds to Maple's coeffs: 68 /// var has to be the number of a variable 69 matrix mp_Coeffs(ideal I, int var, const ring r); 78 70 79 BOOLEAN mpIsDiagUnit(matrix U); 80 void iiWriteMatrix(matrix im, const char *n, int dim,int spaces=0); 81 char * iiStringMatrix(matrix im, int dim,char ch=','); 71 matrix mp_CoeffProc (poly f, poly vars, const ring r); 72 /// corresponds to Macauley's coef: 73 /// the exponent vector of vars has to contain the variables, eg 'xy'; 74 /// then the poly f is searched for monomials in x and y, these monimials 75 /// are written to the first row of the matrix co. 76 /// the second row of co contains the respective factors in f. 77 /// Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2. 78 void mp_Coef2(poly v, poly vars, matrix *c, matrix *m, const ring r); 79 80 /// for minors with Bareiss 81 void mp_RecMin(int, ideal, int &, matrix, int, int, poly, ideal, const ring r); 82 void mp_MinorToResult(ideal, int &, matrix, int, int, ideal, const ring r); 83 84 BOOLEAN mp_IsDiagUnit(matrix U, const ring r); 85 void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces=0); 86 char * iiStringMatrix(matrix im, int dim, const ring r, char ch=','); 82 87 83 88 extern omBin ip_smatrix_bin; 84 #endif 89 90 #endif/* MATPOL_H */ -
libpolys/polys/monomials/ring.cc
ree33a7 r0a3a629 5613 5613 // error message should be in the interpreter interface 5614 5614 5615 mp Delete(&C, dest);5616 mp Delete(&D, dest);5615 mp_Delete(&C, dest); 5616 mp_Delete(&D, dest); 5617 5617 5618 5618 // if (currRing != save) … … 5622 5622 } 5623 5623 5624 // mp Delete(&C, dest); // used by nc_CallPlural!5625 // mp Delete(&D, dest);5624 // mp_Delete(&C, dest); // used by nc_CallPlural! 5625 // mp_Delete(&D, dest); 5626 5626 5627 5627 // if (dest != save) -
libpolys/polys/nc/gring.cc
ree33a7 r0a3a629 3051 3051 } 3052 3052 } 3053 if (( CCC != NULL) && (CC == NULL)) CC = CCC; // mp Copy(CCC); // bug!?3053 if (( CCC != NULL) && (CC == NULL)) CC = CCC; // mp_Copy(CCC, ?); // bug!? 3054 3054 if (( CCN != NULL) && (CN == NULL)) CN = CCN; 3055 3055 … … 3071 3071 } 3072 3072 3073 if (( DDD != NULL) && (DD == NULL)) DD = DDD; // mp Copy(DDD); // ???3073 if (( DDD != NULL) && (DD == NULL)) DD = DDD; // mp_Copy(DDD, ?); // ??? 3074 3074 if (( DDN != NULL) && (DN == NULL)) DN = DDN; 3075 3075 … … 3142 3142 if( bCopyInput ) 3143 3143 { 3144 C = mp Copy(CC, curr, r); // Copy C into r!!!???3144 C = mp_Copy(CC, curr, r); // Copy C into r!!!??? 3145 3145 #ifndef NDEBUG 3146 3146 id_Test((ideal)C, r); … … 3201 3201 if( bCopyInput ) 3202 3202 { 3203 D = mp Copy(DD, curr, r); // Copy DD into r!!!3203 D = mp_Copy(DD, curr, r); // Copy DD into r!!! 3204 3204 #ifndef NDEBUG 3205 3205 id_Test((ideal)D, r); … … 3228 3228 if ( gnc_CheckOrdCondition(D, r) ) 3229 3229 { 3230 if( bCnew ) mp Delete( &C, r );3231 if( bDnew ) mp Delete( &D, r );3230 if( bCnew ) mp_Delete( &C, r ); 3231 if( bDnew ) mp_Delete( &D, r ); 3232 3232 3233 3233 Werror("Matrix of polynomials violates the ordering condition");
Note: See TracChangeset
for help on using the changeset viewer.