source: git/libpolys/polys/matpol.h @ 6ce030f

spielwiese
Last change on this file since 6ce030f was 6ce030f, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
removal of the $Id$ svn tag from everywhere NOTE: the git SHA1 may be used instead (only on special places) NOTE: the libraries Singular/LIB/*.lib still contain the marker due to our current use of svn
  • Property mode set to 100644
File size: 3.0 KB
Line 
1#ifndef MATPOL_H
2#define MATPOL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/*
7* ABSTRACT
8*/
9
10// #include <kernel/structs.h>
11#include <polys/monomials/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
32typedef ip_smatrix *       matrix;
33
34matrix mpNew(int r, int c);
35static inline matrix mp_New(int r, int c){ return mpNew(r,c); }
36
37// matrix mpCopy(matrix a);
38void   mp_Delete(matrix* a, const ring r);
39matrix mp_Copy(const matrix a, const ring rSrc, const ring rDst);
40
41matrix mp_Copy(matrix a, const ring r);
42// static inline matrix mp_Copy(matrix a, const ring r){ return mp_Copy(a, r, r); }
43
44matrix mp_InitP(int r, int c, poly p, const ring R);
45matrix mp_InitI(int r, int c, int v, const ring R);
46matrix mp_MultI(matrix a, int f, const ring r);
47matrix mp_MultP(matrix a, poly p, const ring r);
48matrix pMultMp(poly p, matrix a, const ring r);
49matrix mp_Add(matrix a, matrix b, const ring r);
50matrix mp_Sub(matrix a, matrix b, const ring r);
51matrix mp_Mult(matrix a, matrix b, const ring r);
52matrix mp_Transp(matrix a, const ring r);
53BOOLEAN mp_Equal(matrix a, matrix b, const ring r);
54poly mp_Trace ( matrix a, const ring r);
55poly TraceOfProd ( matrix a, matrix b, int n, const ring r);
56
57// poly mp_Det (matrix m, const ring r);
58matrix mp_Wedge(matrix a, int ar, const ring r);
59
60// BOOLEAN mpJacobi(leftv res,leftv a);
61// BOOLEAN mpKoszul(leftv res,leftv b/*in*/, leftv c/*ip*/, leftv id=NULL);
62
63poly mp_DetBareiss (matrix a, const ring r);
64
65//matrix mp_Homogen(matrix a, int v, const ring r);
66
67void   mp_Monomials(matrix c, int r, int var, matrix m, const ring R);
68
69/// corresponds to Maple's coeffs:
70/// var has to be the number of a variable
71matrix mp_Coeffs(ideal I, int var, const ring r);
72
73matrix mp_CoeffProc (poly f, poly vars, const ring r);
74/// corresponds to Macauley's coef:
75/// the exponent vector of vars has to contain the variables, eg 'xy';
76/// then the poly f is searched for monomials in x and y, these monimials
77/// are written to the first row of the matrix co.
78/// the second row of co contains the respective factors in f.
79/// Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2.
80void mp_Coef2(poly v, poly vars, matrix *c, matrix *m, const ring r);
81
82/// for minors with Bareiss
83void mp_RecMin(int, ideal, int &, matrix, int, int, poly, ideal, const ring);
84void mp_MinorToResult(ideal, int &, matrix, int, int, ideal, const ring);
85
86BOOLEAN mp_IsDiagUnit(matrix U, const ring r);
87
88/// set spaces to zero by default
89void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces);
90
91char * iiStringMatrix(matrix im, int dim, const ring r, char ch=',');
92
93extern omBin ip_smatrix_bin;
94
95#endif/* MATPOL_H */
Note: See TracBrowser for help on using the repository browser.