source: git/kernel/matpol.h @ c1a5fd

fieker-DuValspielwiese
Last change on this file since c1a5fd was 395df5, checked in by Hans Schönemann <hannes@…>, 14 years ago
currRing git-svn-id: file:///usr/local/Singular/svn/trunk@12547 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.4 KB
Line 
1#ifndef MATPOL_H
2#define MATPOL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7/*
8* ABSTRACT
9*/
10#include "structs.h"
11#include "ring.h" // for currRing
12
13// THIS IS REALLY DIRTY: ip_smatrix HAS TO BE IDENTICAL TO ip_sideal
14// SO, DON'T CHANGE THE DECLARATION OF ip_smatrix
15class ip_smatrix
16{
17  public:
18
19  poly *m;
20  long rank;
21  int nrows;
22  int ncols;
23
24  inline int& rows() { return nrows; }
25  inline int& cols() { return ncols; }
26
27  #define MATROWS(i) ((i)->nrows)
28  #define MATCOLS(i) ((i)->ncols)
29  #define MATELEM(mat,i,j) ((mat)->m)[MATCOLS((mat)) * ((i)-1) + (j)-1]
30};
31
32matrix mpNew(int r, int c);
33matrix mpCopy(matrix a);
34void   mpDelete(matrix* a, const ring r = currRing);
35matrix mpCopy(const matrix a, const ring rSrc, const ring rDst = currRing);
36matrix mpInitP(int r, int c, poly p);
37matrix mpInitI(int r, int c, int v);
38matrix mpMultI(matrix a, int f);
39matrix mpMultP(matrix a, poly p);
40matrix mpAdd(matrix a, matrix b);
41matrix mpSub(matrix a, matrix b);
42matrix mpMult(matrix a, matrix b);
43matrix mpTransp(matrix a);
44BOOLEAN mpEqual(matrix a, matrix b);
45poly mpTrace ( matrix a);
46poly TraceOfProd ( matrix a, matrix b, int n);
47
48poly mpDet (matrix m);
49matrix mpWedge(matrix a, int ar);
50BOOLEAN mpJacobi(leftv res,leftv a);
51BOOLEAN mpKoszul(leftv res,leftv b/*in*/, leftv c/*ip*/, leftv id=NULL);
52poly mpDetBareiss (matrix a);
53
54//matrix mpHomogen(matrix a, int v);
55
56void   mpMonomials(matrix c, int r, int var, matrix m);
57matrix mpCoeffs(ideal I, int var);
58/* corresponds to Maple's coeffs:
59*var has to be the number of a variable
60*/
61
62matrix mpCoeffProc (poly f, poly vars);
63/* corresponds to Macauley's coef:
64the exponent vector of vars has to contain the variables, eg 'xy';
65then the poly f is searched for monomials in x and y, these monimials
66are written to the first row of the matrix co.
67the second row of co contains the respective factors in f.
68Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2. */
69void mpCoef2(poly v, poly vars, matrix *c, matrix *m);
70/* for minors with Bareiss */
71void mpRecMin(int, ideal, int &, matrix, int, int, poly, ideal);
72void mpMinorToResult(ideal, int &, matrix, int, int, ideal);
73
74BOOLEAN mpIsDiagUnit(matrix U);
75void iiWriteMatrix(matrix im, const char *n, int dim,int spaces=0);
76char * iiStringMatrix(matrix im, int dim,char ch=',');
77
78extern omBin ip_smatrix_bin;
79#endif
Note: See TracBrowser for help on using the repository browser.