62 "Attemp to resize QMatrixCArray when not the "
65 fSize=nMatrix*nRow*nCol*2;
72 for(UInt_t i=0;i<
fSize;i+=2){
82 Form(
"Matrix index out of bounds (%ui>%ui)",
90 Form(
"Matrix index out of bounds (%ui>%ui)",
98 Form(
"Vector indices out of bounds (%ui,%ui)>"
106 Form(
"Vector indices out of bounds (%ui,%ui)>"
120 std::cout<<
"CholeskyDecomp Matrix " << i << std::endl;
126 if(Y.Size()!=GetNMatrix()*GetNRow())
128 "CholeskySolveX: Dimensions do not match!"));
130 for(UInt_t i=0;i<GetNMatrix();i++){
131 Diana::QVectorC subX=X.GetSubVector(GetNRow(),i*GetNRow());
132 Diana::QVectorC subY=Y.GetSubVector(GetNRow(),i*GetNRow());
133 Diana::QMatrixC subM=GetMatrix(i);
134 subM.CholeskySolveX(Y,X);
double Im(const Diana::QComplex &z)
Function to get the imag part.
double Re(const Diana::QComplex &z)
Function to get the real part.
#define Q_BEGIN_NAMESPACE
ClassImp(Diana::QMatrixCArray) Q_BEGIN_NAMESPACE QMatrixCArray
error class with error type and description
An array of complex matrices that have been laid out in memory.
UInt_t fNMatrix
Number of identical matrices.
UInt_t fSize
Number of double values in fData.
Diana::QVectorC GetVector(UInt_t idx1, UInt_t idx2)
Return the vector of values in the (idx1,idx2) position.
Double_t * fData
Pointer to the head of the data.
void Resize(UInt_t nMatrix, UInt_t nRow, UInt_t nCol)
Resize, destroys all data in memory.
UInt_t fNRow
Number of rows in each matrix.
void CholeskyDecompose()
Cholesky decompose the matrices in place.
UInt_t fNCol
Number of columns in each matrix.
UInt_t GetNRow() const
Return the number of rows in each matrix.
QMatrixCArray()
Default ctor.
void Initialize(double Re, double Im=0)
Initialize the values of the matrix.
void Invert()
Invert the matrices in place.
QMatrixC GetMatrix(UInt_t idx)
Return the vector of values in the (idx1,idx2) position.
UInt_t GetNMatrix() const
Return the number of matrices stored.
UInt_t GetNCol() const
Return the number of columns in each matrix.
virtual void CholeskySolveX(const Diana::QVectorC &Y, Diana::QVectorC &X) const
Solve the equation AX=Y for X.
virtual void Clear()
Clear the data in memory.
const QMatrixCArray & operator=(const QMatrixCArray &in)
Interface for complex matrices in Diana analysis.
virtual const QMatrixC & CholeskyDecompose()
Cholesky Decomposition.
const QMatrixC & Invert()
inverse
Interface for complex vectors in Diana analysis.
static void ArrayFree(double *array)
static double * ArrayAlloc(const UInt_t size)