source: git/Singular/matpol.h @ 2c694a2

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