source: git/kernel/matpol.h @ 61944d0

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