Allink  v0.1
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <math.h>
6 #include "MatematicaStruct.h"
7 //---------------------Matrice--------------------
10 class Matrice{
11  private:
13  void allocate(){
14  delete[] data;
15  data = new double [NSize*NSize];
16  };
18  int NSize;
20  int NCol;
22  int NRow;
24  int NZed;
26  int NDim;
27  public:
29  Matrice(int newNSize);// {Matrice(newNSize,newNSize);};
30  //Matrice(int newNSize, int newactualsize);
32  Matrice(int NRow, int NCol);
34  Matrice(int NRow, int NCol,int NZed);
37  Matrice(int ExtNRow, int ExtNCol, double *pointer);
40  Matrice(SPLINE Wg);
43  Matrice(SPLINE Wg,int Dim);
45  Matrice(Quadri q,int dim);
47  Matrice(double *M,int Nr,int Nc);
49  Matrice(double Roll,double Pitch,double Yaw,int NDim);
51  Matrice(double *Axis,double Angle,int NDim);
53  ~Matrice();
55  bool Set(int row, int column,double Val);
57  bool Add(int row,int col,double Val);
59  int Size(){return NSize;};
61  int pNCol(){return NCol;};
63  int pNRow(){return NRow;};
65  int pNZed(){return NZed;};
67  void Apply(double *Known,double *UnKnown);
69  int Solve(double *Known,double *UnKnown);
71  int getNRow();
73  void Shout(const char *s, ... );
75  void comparetoidentity();
77  void settoproduct(Matrice& left, Matrice& right);
79  void copymatrix(Matrice& source);
81  void setNRow(int newNRow);
83  void getvalue(int row, int column, double& returnvalue, bool& success);
85  void Invert();
87  void Mult(Matrice &A,Matrice &B);
89  void Mult(Matrice &A);
91  Vettore Mult(Matrice &A,Vettore &v);
93  Vettore Mult(Vettore &v);
95  void Mult(Vettore &v,Vettore &u);
97  void RandomFill(double Max);
99  void FillDiffOperator(SPLINE Wg,int NDim);
101  void FillCanny();
103  void FillGaussian(double Sigma,double CutOff);
105  void FillGaussian5();
107  void Transpose();
109  void Normalize();
111  void Clear();
113  void Multiply(double Val);
115  void CopyOn(Matrice *B);
117  void Print();
119  double Val(int row);
121  double Val(int row,int col);
123  double Val(int row,int col,int zed);
125  double Det();
128  //Matrice operator*(Matrice&) ;
131  // Matrice &operator*(const Matrice&) const;
133  Matrice operator*(const double&) const;
135  Vettore operator*(const Vettore&) const;
138  // Matrice operator[][](int row,int col);
140  Matrice operator^(Matrice&) const;
142  double* data;
144  void ConvoluteMatrix(double *Plot,int NGrid,int NDim,int IfMinImConv);
146  void ConvoluteMatrix1(double *Plot,int NGrid);
148  void ConvoluteMatrix1MinImConv(double *Plot,int NGrid);
150  void ConvoluteMatrix2(double *Plot,int NGrid);
152  void ConvoluteMatrix2MinImConv(double *Plot,int NGrid);
154  void ConvoluteMatrix3(double *Plot,int NGrid);
155 };
156 #endif //MATEMATICA_H
void FillGaussian5()
Fill the entries for the 5x5 Gauss blur.
int pNCol()
Number of columns.
void RandomFill(double Max)
Fill the entries randomly.
int Solve(double *Known, double *UnKnown)
Solve a system A|b = y.
int getNRow()
Return size.
void copymatrix(Matrice &source)
Copy matrix.
Matrice operator=(Matrice &)
Copy two matrices.
Geometrical operations on vectors.
Definition: MatematicaVect.h:9
void CopyOn(Matrice *B)
Copy on a matrix.
void FillDiffOperator(SPLINE Wg, int NDim)
Fill the entries of a differential operator.
void Mult(Matrice &A, Matrice &B)
Multiplication between two matrices.
Matrice operator*(Matrice &A)
Multiplies two matrices.
void ConvoluteMatrix2(double *Plot, int NGrid)
Convolute with a matrix.
double Det()
Computes the determinants.
void ConvoluteMatrix(double *Plot, int NGrid, int NDim, int IfMinImConv)
Convolute with a matrix.
void Invert()
void ConvoluteMatrix3(double *Plot, int NGrid)
Convolute with a matrix.
void Clear()
Set all the entries to zero.
void Normalize()
Normalize the matrix.
void Transpose()
Transpose the matrix.
void ConvoluteMatrix1(double *Plot, int NGrid)
Convolute with a matrix.
void Multiply(double Val)
Multiply by a scalar.
double Val(int row)
Returns a value in 1d.
void ConvoluteMatrix2MinImConv(double *Plot, int NGrid)
Convolute with a matrix.
void setNRow(int newNRow)
Set new size.
void settoproduct(Matrice &left, Matrice &right)
Set to product.
bool Add(int row, int col, double Val)
Add the value of the coefficient to the previous one.
void FillGaussian(double Sigma, double CutOff)
Fill the entries for the Gauss blur.
Matrice operator^(Matrice &) const
Tensor product?
Matrice computes the algebric operations on matrices.
bool Set(int row, int column, double Val)
Set a coefficient.
void Apply(double *Known, double *UnKnown)
Apply Ax = y.
int Size()
Size of Matrice.
Quaternion class.
Matrice operator+(Matrice &)
Sums two matrices.
int pNZed()
Number of zed.
int pNRow()
Number of rows.
void getvalue(int row, int column, double &returnvalue, bool &success)
Return value.
Coefficient of a spline.
void FillCanny()
Fill the entries for the Canny edge detector.
void Print()
Print the entries.
void comparetoidentity()
Compare to identity.
double * data
Stored entries.
void Shout(const char *s,...)
Name of the last function called. For debugging.
Matrice(int newNSize)
creates a square Matrice
void ConvoluteMatrix1MinImConv(double *Plot, int NGrid)
Convolute with a matrix.