CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignmentExtendedCorrelationsEntry.cc
Go to the documentation of this file.
1 
3 
4 
6 // theCounter( 0 ),
7  theNRows( 0 ),
8  theNCols( 0 )
9 {}
10 
11 
13  short unsigned int nCols ) :
14 // theCounter( 0 ),
15  theNRows( nRows ),
16  theNCols( nCols ),
17  theData( nRows*nCols )
18 {}
19 
20 
22  short unsigned int nCols,
23  const float init ) :
24 // theCounter( 0 ),
25  theNRows( nRows ),
26  theNCols( nCols ),
27  theData( nRows*nCols, init )
28 {}
29 
30 
32 // theCounter( 0 ),
33  theNRows( mat.num_row() ),
34  theNCols( mat.num_col() ),
35  theData( mat.num_row()*mat.num_col() )
36 {
37  for ( int i = 0; i < mat.num_row(); ++i )
38  {
39  for ( int j = 0; j < mat.num_col(); ++j )
40  {
41  theData[i*theNCols+j] = mat[i][j];
42  }
43  }
44 }
45 
46 
48 {
49  for ( std::vector< float >::iterator it = theData.begin(); it != theData.end(); ++it ) (*it) *= multiply;
50 }
51 
52 
54 {
56 
57  for ( int i = 0; i < theNRows; ++i )
58  {
59  for ( int j = 0; j < theNCols; ++j )
60  {
61  result[i][j] = theData[i*theNCols+j];
62  }
63  }
64 
65  return result;
66 }
void operator*=(const float multiply)
Multiply all elements of the correlations matrix with a given number.
int i
Definition: DBlmapReader.cc:9
int init
Definition: HydjetWrapper.h:67
AlignmentExtendedCorrelationsEntry(void)
Default constructor.
AlgebraicMatrix matrix(void) const
Retrieve the correlation matrix in a CLHEP matrix representation;.
CLHEP::HepMatrix AlgebraicMatrix
tuple result
Definition: query.py:137
int j
Definition: DBlmapReader.cc:9