source: git/kernel/matpol.h @ 76e501

spielwiese
Last change on this file since 76e501 was 599326, checked in by Kai Krüger <krueger@…>, 14 years ago
Anne, Kai, Frank: - changes to #include "..." statements to allow cleaner build structure - affected directories: omalloc, kernel, Singular - not yet done: IntergerProgramming git-svn-id: file:///usr/local/Singular/svn/trunk@13032 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 <kernel/structs.h>
11#include <kernel/ring.h>
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 pMultMp(poly p, matrix a);
41matrix mpAdd(matrix a, matrix b);
42matrix mpSub(matrix a, matrix b);
43matrix mpMult(matrix a, matrix b);
44matrix mpTransp(matrix a);
45BOOLEAN mpEqual(matrix a, matrix b);
46poly mpTrace ( matrix a);
47poly TraceOfProd ( matrix a, matrix b, int n);
48
49poly mpDet (matrix m);
50matrix mpWedge(matrix a, int ar);
51BOOLEAN mpJacobi(leftv res,leftv a);
52BOOLEAN mpKoszul(leftv res,leftv b/*in*/, leftv c/*ip*/, leftv id=NULL);
53poly mpDetBareiss (matrix a);
54
55//matrix mpHomogen(matrix a, int v);
56
57void   mpMonomials(matrix c, int r, int var, matrix m);
58matrix mpCoeffs(ideal I, int var);
59/* corresponds to Maple's coeffs:
60*var has to be the number of a variable
61*/
62
63matrix mpCoeffProc (poly f, poly vars);
64/* corresponds to Macauley's coef:
65the exponent vector of vars has to contain the variables, eg 'xy';
66then the poly f is searched for monomials in x and y, these monimials
67are written to the first row of the matrix co.
68the second row of co contains the respective factors in f.
69Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2. */
70void mpCoef2(poly v, poly vars, matrix *c, matrix *m);
71/* for minors with Bareiss */
72void mpRecMin(int, ideal, int &, matrix, int, int, poly, ideal);
73void mpMinorToResult(ideal, int &, matrix, int, int, ideal);
74
75BOOLEAN mpIsDiagUnit(matrix U);
76void iiWriteMatrix(matrix im, const char *n, int dim,int spaces=0);
77char * iiStringMatrix(matrix im, int dim,char ch=',');
78
79extern omBin ip_smatrix_bin;
80#endif
Note: See TracBrowser for help on using the repository browser.