CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MatrixMeschach.h
Go to the documentation of this file.
1 // COCOA class header file
2 //Id: MatrixMeschach.h
3 //CAT: Model
4 //
5 // Class for matrices
6 //
7 // History: v1.0
8 // Pedro Arce
9 
10 #ifndef _ALIMATRIX_HH
11 #define _ALIMATRIX_HH
12 
14 #include <vector>
15 #include <iostream>
16 
17 
18 extern "C" {
19  #include <matrix.h>
20  #include <matrix2.h>
21 }
22 
23 
25 {
26 public:
27  MatrixMeschach( );
28  MatrixMeschach( ALIint NoCol, ALIint NoLin );
29  MatrixMeschach( const MatrixMeschach& mat );
31 
32  void AddData( ALIuint col, ALIuint lin, ALIdouble data );
33  void transpose();
34  void inverse();
35  void Dump( const ALIstring& mtext );
36  void ostrDump( std::ostream& fout, const ALIstring& mtext );
37  void EliminateLines( ALIint lin_first, ALIint lin_last );
38  void EliminateColumns( ALIint lin_first, ALIint lin_last );
40 
41 
43  void operator*=( const MatrixMeschach& mat );
44  void operator+=( const MatrixMeschach& mat );
45  void operator*=( const ALIdouble num );
46  ALIdouble operator () (int i, int j) const;
47 
48 //ACCESS PRIVATE DATA MEMBERS
49  ALIint NoLines() const{
50  return _NoLines;
51  }
52  ALIint NoColumns() const{
53  return _NoColumns;
54  }
55  void setNoColumns( ALIint ncol ){
56  _NoColumns = ncol;
57  }
58  void setNoLines( ALIint nlin ){
59  _NoLines = nlin;
60  }
61  const MAT* Mat() const{
62  return _Mat;
63  }
64  void setMat( MAT* mat){
65  _Mat = mat;
66  }
67  MAT* MatNonConst() const{
68  return _Mat;
69  }
70 
71 
72 private:
73  // private data members
76  // vector< ALIdouble> _data;
77  MAT* _Mat;
78 
79  void copy( const MatrixMeschach& mat);
80 
81 };
82 
83 MatrixMeschach operator*( const MatrixMeschach& mat1, const MatrixMeschach& mat2 );
84 MatrixMeschach operator+( const MatrixMeschach& mat1, const MatrixMeschach& mat2 );
85 MatrixMeschach operator-( const MatrixMeschach& mat1, const MatrixMeschach& mat2 );
86 MatrixMeschach operator*( const ALIdouble doub, const MatrixMeschach& mat );
87 MatrixMeschach operator*( const MatrixMeschach& mat, const ALIdouble doub );
88 
89 MatrixMeschach* MatrixByMatrix( const MatrixMeschach& mat1, const MatrixMeschach& mat2 );
91 
92 #endif
void copy(const MatrixMeschach &mat)
int i
Definition: DBlmapReader.cc:9
ALIint NoLines() const
long double ALIdouble
Definition: CocoaGlobals.h:11
ALIdouble operator()(int i, int j) const
MatrixMeschach operator+(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
MatrixMeschach operator-(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
MatrixMeschach * MatrixByMatrix(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
int ALIint
Definition: CocoaGlobals.h:15
ALIint NoColumns() const
void EliminateLines(ALIint lin_first, ALIint lin_last)
int j
Definition: DBlmapReader.cc:9
void operator+=(const MatrixMeschach &mat)
const MAT * Mat() const
void SetCorrelation(ALIint i1, ALIint i2, ALIdouble corr)
void EliminateColumns(ALIint lin_first, ALIint lin_last)
JetCorrectorParameters corr
Definition: classes.h:9
MatrixMeschach ALIMatrix
MAT * MatNonConst() const
void ostrDump(std::ostream &fout, const ALIstring &mtext)
void AddData(ALIuint col, ALIuint lin, ALIdouble data)
long long int num
Definition: procUtils.cc:71
void setNoColumns(ALIint ncol)
std::string ALIstring
Definition: CocoaGlobals.h:9
void operator*=(const MatrixMeschach &mat)
MatrixMeschach operator*(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
MatrixMeschach & operator=(const MatrixMeschach &mat)
void setNoLines(ALIint nlin)
void setMat(MAT *mat)
void Dump(const ALIstring &mtext)
unsigned int ALIuint
Definition: CocoaGlobals.h:17