source: git/kernel/matpol.h @ 98938c

spielwiese
Last change on this file since 98938c was 35aab3, checked in by Hans Schönemann <hannes@…>, 20 years ago
This commit was generated by cvs2svn to compensate for changes in r6879, which included commits to RCS files with non-trunk default branches. git-svn-id: file:///usr/local/Singular/svn/trunk@6880 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.3 KB
Line 
1#ifndef MATPOL_H
2#define MATPOL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: matpol.h,v 1.1.1.1 2003-10-06 12:15:57 Singular 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);
33matrix mpInitP(int r, int c, poly p);
34matrix mpInitI(int r, int c, int v);
35matrix mpMultI(matrix a, int f);
36matrix mpMultP(matrix a, poly p);
37matrix mpAdd(matrix a, matrix b);
38matrix mpSub(matrix a, matrix b);
39matrix mpMult(matrix a, matrix b);
40matrix mpTransp(matrix a);
41BOOLEAN mpEqual(matrix a, matrix b);
42poly mpTrace ( matrix a);
43poly TraceOfProd ( matrix a, matrix b, int n);
44
45poly mpDet (matrix m);
46matrix mpWedge(matrix a, int ar);
47BOOLEAN mpJacobi(leftv res,leftv a);
48BOOLEAN mpKoszul(leftv res,leftv b/*in*/, leftv c/*ip*/, leftv id=NULL);
49poly mpDetBareiss (matrix a);
50
51//matrix mpHomogen(matrix a, int v);
52
53void   mpMonomials(matrix c, int r, int var, matrix m);
54matrix mpCoeffs(ideal I, int var);
55/* corresponds to Maple's coeffs:
56*var has to be the number of a variable
57*/
58
59matrix mpCoeffProc (poly f, poly vars);
60/* corresponds to Macauley's coef:
61the exponent vector of vars has to contain the variables, eg 'xy';
62then the poly f is searched for monomials in x and y, these monimials
63are written to the first row of the matrix co.
64the second row of co contains the respective factors in f.
65Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2. */
66void mpCoef2(poly v, poly vars, matrix *c, matrix *m);
67/* for minors with Bareiss */
68void mpRecMin(int, ideal, int &, matrix, int, int, poly, ideal);
69void mpMinorToResult(ideal, int &, matrix, int, int, ideal);
70
71BOOLEAN mpIsDiagUnit(matrix U);
72void iiWriteMatrix(matrix im, const char *n, int dim,int spaces=0);
73char * iiStringMatrix(matrix im, int dim,char ch=',');
74
75extern omBin ip_smatrix_bin;
76#endif
Note: See TracBrowser for help on using the repository browser.