Changeset 0a3a629 in git


Ignore:
Timestamp:
Apr 13, 2011, 7:17:16 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
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
Message:
FIX: fixed the matrix-related inteface: e.g. mpCopy(matrix) -> mp_Copy(matrix, const ring)
Location:
libpolys/polys
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/matpol.cc

    ree33a7 r0a3a629  
    9090}
    9191
    92 /*2
    93 *copies matrix a to b
    94 */
    95 matrix mpCopy (matrix a)
     92/// copies matrix a to b
     93matrix mpCopy (matrix a, const ring r)
    9694{
    9795  idTest((ideal)a);
  • libpolys/polys/matpol.h

    ree33a7 r0a3a629  
    3232
    3333matrix mpNew(int r, int c);
     34static inline matrix mp_New(int r, int c){ return mpNew(r,c); }
     35
    3436// matrix mpCopy(matrix a);
    35 void   mpDelete(matrix* a, const ring r);
    36 matrix mpCopy(const matrix a, const ring rSrc, const ring rDst);
     37void   mp_Delete(matrix* a, const ring r);
     38matrix mp_Copy(const matrix a, const ring rSrc, const ring rDst);
    3739
    38 static inline matrix mp_Copy(matrix a, ring r){ return mpCopy(a, r, r); }
     40matrix mp_Copy(matrix a, const ring r);
     41// static inline matrix mp_Copy(matrix a, const ring r){ return mp_Copy(a, r, r); }
    3942
    40 matrix mpInitP(int r, int c, poly p);
    41 matrix mpInitI(int r, int c, int v);
    42 matrix mpMultI(matrix a, int f);
    43 matrix mpMultP(matrix a, poly p);
    44 matrix pMultMp(poly p, matrix a);
    45 matrix mpAdd(matrix a, matrix b);
    46 matrix mpSub(matrix a, matrix b);
    47 matrix mpMult(matrix a, matrix b);
    48 matrix mpTransp(matrix a);
    49 BOOLEAN mpEqual(matrix a, matrix b);
    50 poly mpTrace ( matrix a);
    51 poly TraceOfProd ( matrix a, matrix b, int n);
     43matrix mp_InitP(int r, int c, poly p, const ring R);
     44matrix mp_InitI(int r, int c, int v, const ring R);
     45matrix mp_MultI(matrix a, int f, const ring r);
     46matrix mp_MultP(matrix a, poly p, const ring r);
     47matrix pMultMp(poly p, matrix a, const ring r);
     48matrix mp_Add(matrix a, matrix b, const ring r);
     49matrix mp_Sub(matrix a, matrix b, const ring r);
     50matrix mp_Mult(matrix a, matrix b, const ring r);
     51matrix mp_Transp(matrix a, const ring r);
     52BOOLEAN mp_Equal(matrix a, matrix b, const ring r);
     53poly mp_Trace ( matrix a, const ring r);
     54poly TraceOfProd ( matrix a, matrix b, int n, const ring r);
    5255
    53 poly mpDet (matrix m);
    54 matrix mpWedge(matrix a, int ar);
     56poly mp_Det (matrix m, const ring r);
     57matrix mp_Wedge(matrix a, int ar, const ring r);
     58
    5559// BOOLEAN mpJacobi(leftv res,leftv a);
    5660// BOOLEAN mpKoszul(leftv res,leftv b/*in*/, leftv c/*ip*/, leftv id=NULL);
    57 poly mpDetBareiss (matrix a);
     61poly mp_DetBareiss (matrix a, const ring r);
    5862
    59 //matrix mpHomogen(matrix a, int v);
     63//matrix mp_Homogen(matrix a, int v, const ring r);
    6064
    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 */
     65void   mp_Monomials(matrix c, int r, int var, matrix m, const ring R);
    6666
    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
     69matrix mp_Coeffs(ideal I, int var, const ring r);
    7870
    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=',');
     71matrix 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.
     78void mp_Coef2(poly v, poly vars, matrix *c, matrix *m, const ring r);
     79
     80/// for minors with Bareiss
     81void mp_RecMin(int, ideal, int &, matrix, int, int, poly, ideal, const ring r);
     82void mp_MinorToResult(ideal, int &, matrix, int, int, ideal, const ring r);
     83
     84BOOLEAN mp_IsDiagUnit(matrix U, const ring r);
     85void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces=0);
     86char * iiStringMatrix(matrix im, int dim, const ring r, char ch=',');
    8287
    8388extern omBin ip_smatrix_bin;
    84 #endif
     89
     90#endif/* MATPOL_H */
  • libpolys/polys/monomials/ring.cc

    ree33a7 r0a3a629  
    56135613    // error message should be in the interpreter interface
    56145614
    5615     mpDelete(&C, dest);
    5616     mpDelete(&D, dest);
     5615    mp_Delete(&C, dest);
     5616    mp_Delete(&D, dest);
    56175617
    56185618//    if (currRing != save)
     
    56225622  }
    56235623
    5624 //  mpDelete(&C, dest); // used by nc_CallPlural!
    5625 //  mpDelete(&D, dest);
     5624//  mp_Delete(&C, dest); // used by nc_CallPlural!
     5625//  mp_Delete(&D, dest);
    56265626
    56275627//  if (dest != save)
  • libpolys/polys/nc/gring.cc

    ree33a7 r0a3a629  
    30513051    }
    30523052  }
    3053   if (( CCC != NULL) && (CC == NULL)) CC = CCC; // mpCopy(CCC); // bug!?
     3053  if (( CCC != NULL) && (CC == NULL)) CC = CCC; // mp_Copy(CCC, ?); // bug!?
    30543054  if (( CCN != NULL) && (CN == NULL)) CN = CCN;
    30553055
     
    30713071  }
    30723072
    3073   if (( DDD != NULL) && (DD == NULL)) DD = DDD; // mpCopy(DDD); // ???
     3073  if (( DDD != NULL) && (DD == NULL)) DD = DDD; // mp_Copy(DDD, ?); // ???
    30743074  if (( DDN != NULL) && (DN == NULL)) DN = DDN;
    30753075
     
    31423142    if( bCopyInput )
    31433143    {
    3144       C = mpCopy(CC, curr, r); // Copy C into r!!!???
     3144      C = mp_Copy(CC, curr, r); // Copy C into r!!!???
    31453145#ifndef NDEBUG
    31463146      id_Test((ideal)C, r);
     
    32013201    if( bCopyInput )
    32023202    {
    3203       D = mpCopy(DD, curr, r); // Copy DD into r!!!
     3203      D = mp_Copy(DD, curr, r); // Copy DD into r!!!
    32043204#ifndef NDEBUG
    32053205      id_Test((ideal)D, r);
     
    32283228  if ( gnc_CheckOrdCondition(D, r) )
    32293229  {
    3230     if( bCnew ) mpDelete( &C, r );
    3231     if( bDnew ) mpDelete( &D, r );
     3230    if( bCnew ) mp_Delete( &C, r );
     3231    if( bDnew ) mp_Delete( &D, r );
    32323232
    32333233    Werror("Matrix of polynomials violates the ordering condition");
Note: See TracChangeset for help on using the changeset viewer.