CMS 3D CMS Logo

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 extern "C" {
18 #include <matrix.h>
19 #include <matrix2.h>
20 }
21 
22 // Meschach external (matrix.h) defines C++-incompatible macros
23 // which break other code (e.g. standard <limits>).
24 // Since these are not used here, undef them.
25 #undef max
26 #undef min
27 #undef catch
28 #undef Real
29 
31 public:
33  MatrixMeschach(ALIint NoCol, ALIint NoLin);
34  MatrixMeschach(const MatrixMeschach& mat);
36 
38  void transpose();
39  void inverse();
40  void Dump(const ALIstring& mtext);
41  void ostrDump(std::ostream& fout, const ALIstring& mtext);
42  void EliminateLines(ALIint lin_first, ALIint lin_last);
43  void EliminateColumns(ALIint lin_first, ALIint lin_last);
45 
47  void operator*=(const MatrixMeschach& mat);
48  void operator+=(const MatrixMeschach& mat);
49  void operator*=(const ALIdouble num);
50  ALIdouble operator()(int i, int j) const;
51 
52  //ACCESS PRIVATE DATA MEMBERS
53  ALIint NoLines() const { return _NoLines; }
54  ALIint NoColumns() const { return _NoColumns; }
55  void setNoColumns(ALIint ncol) { _NoColumns = ncol; }
56  void setNoLines(ALIint nlin) { _NoLines = nlin; }
57  const MAT* Mat() const { return _Mat; }
58  void setMat(MAT* mat) { _Mat = mat; }
59  MAT* MatNonConst() const { return _Mat; }
60 
61 private:
62  // private data members
65  // vector< ALIdouble> _data;
66  MAT* _Mat;
67 
68  void copy(const MatrixMeschach& mat);
69 };
70 
71 MatrixMeschach operator*(const MatrixMeschach& mat1, const MatrixMeschach& mat2);
72 MatrixMeschach operator+(const MatrixMeschach& mat1, const MatrixMeschach& mat2);
73 MatrixMeschach operator-(const MatrixMeschach& mat1, const MatrixMeschach& mat2);
74 MatrixMeschach operator*(const ALIdouble doub, const MatrixMeschach& mat);
75 MatrixMeschach operator*(const MatrixMeschach& mat, const ALIdouble doub);
76 
79 
80 #endif
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
mps_fire.i
i
Definition: mps_fire.py:428
MatrixMeschach::setNoColumns
void setNoColumns(ALIint ncol)
Definition: MatrixMeschach.h:55
operator*
MatrixMeschach operator*(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
Definition: MatrixMeschach.cc:117
MatrixMeschach::MatrixMeschach
MatrixMeschach()
Definition: MatrixMeschach.cc:14
MatrixMeschach::transpose
void transpose()
Definition: MatrixMeschach.cc:185
MatrixMeschach::SetCorrelation
void SetCorrelation(ALIint i1, ALIint i2, ALIdouble corr)
Definition: MatrixMeschach.cc:334
cuy.col
col
Definition: cuy.py:1010
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
ALIstring
std::string ALIstring
Definition: CocoaGlobals.h:9
MatrixMeschach::operator()
ALIdouble operator()(int i, int j) const
Definition: MatrixMeschach.cc:248
MatrixMeschach::operator+=
void operator+=(const MatrixMeschach &mat)
Definition: MatrixMeschach.cc:93
MatrixMeschach::AddData
void AddData(ALIuint col, ALIuint lin, ALIdouble data)
Definition: MatrixMeschach.cc:237
MatrixMeschach::NoLines
ALIint NoLines() const
Definition: MatrixMeschach.h:53
MatrixMeschach::~MatrixMeschach
~MatrixMeschach()
Definition: MatrixMeschach.cc:19
MatrixMeschach::_NoLines
ALIint _NoLines
Definition: MatrixMeschach.h:63
MatrixMeschach::EliminateLines
void EliminateLines(ALIint lin_first, ALIint lin_last)
Definition: MatrixMeschach.cc:253
MatrixMeschach::Dump
void Dump(const ALIstring &mtext)
Definition: MatrixMeschach.cc:317
MatrixMeschach::Mat
const MAT * Mat() const
Definition: MatrixMeschach.h:57
MatrixMeschach::NoColumns
ALIint NoColumns() const
Definition: MatrixMeschach.h:54
operator-
MatrixMeschach operator-(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
Definition: MatrixMeschach.cc:167
MatrixByMatrix
MatrixMeschach * MatrixByMatrix(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
Definition: MatrixMeschach.cc:345
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
MatrixMeschach::operator=
MatrixMeschach & operator=(const MatrixMeschach &mat)
Definition: MatrixMeschach.cc:56
MatrixMeschach::_Mat
MAT * _Mat
Definition: MatrixMeschach.h:66
MatrixMeschach::inverse
void inverse()
Definition: MatrixMeschach.cc:224
MatrixMeschach::operator*=
void operator*=(const MatrixMeschach &mat)
Definition: MatrixMeschach.cc:70
ALIdouble
long double ALIdouble
Definition: CocoaGlobals.h:11
groupFilesInBlocks.fout
fout
Definition: groupFilesInBlocks.py:162
ALIuint
unsigned int ALIuint
Definition: CocoaGlobals.h:17
MatrixMeschach::EliminateColumns
void EliminateColumns(ALIint lin_first, ALIint lin_last)
Definition: MatrixMeschach.cc:285
MatrixMeschach::_NoColumns
ALIint _NoColumns
Definition: MatrixMeschach.h:64
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
MatrixMeschach::setMat
void setMat(MAT *mat)
Definition: MatrixMeschach.h:58
MatrixMeschach
Definition: MatrixMeschach.h:30
ALIMatrix
MatrixMeschach ALIMatrix
Definition: MatrixMeschach.h:78
MatrixMeschach::setNoLines
void setNoLines(ALIint nlin)
Definition: MatrixMeschach.h:56
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ALIint
int ALIint
Definition: CocoaGlobals.h:15
MatrixMeschach::MatNonConst
MAT * MatNonConst() const
Definition: MatrixMeschach.h:59
CocoaGlobals.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
MatrixMeschach::ostrDump
void ostrDump(std::ostream &fout, const ALIstring &mtext)
Definition: MatrixMeschach.cc:320
operator+
MatrixMeschach operator+(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
Definition: MatrixMeschach.cc:154
MatrixMeschach::copy
void copy(const MatrixMeschach &mat)
Definition: MatrixMeschach.cc:44