1 #ifndef LAP_DoubleFullSymmetricMatrix_H
2 #define LAP_DoubleFullSymmetricMatrix_H
66 inline static SP::LAP_DoubleFullSymmetricMatrix
New() {
74 SP::LAP_DoubleFullSymmetricMatrix p=
New();
82 SP::LAP_DoubleFullSymmetricMatrix p=
New(nRows);
84 double *vs=&(*p.get())[0];
272 const double* values) {
429 throw LAP_Exception(
"math/linalg/core",
"LAP_DoubleFullSymmetricMatrix::product()",
"incompatible size of X vector");
438 throw LAP_Exception(
"math/linalg/core",
"LAP_DoubleFullSymmetricMatrix::product()",
"incompatible size of Y vector");
464 throw LAP_Exception(
"math/linalg/core",
"LAP_DoubleFullSymmetricMatrix::product()",
"incompatible size of X vector");
473 throw LAP_Exception(
"math/linalg/core",
"LAP_DoubleFullSymmetricMatrix::product()",
"incompatible size of Y vector");
518 cout <<
"WARNING:row increment matrix ignored in lapack functions. It is set to 1. \n";
522 if (nRows==0)
return;
524 throw LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::product",
"incompatible size of X vector");
527 throw LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::product",
"incompatible size of Y vector");
530 throw LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::product",
"x & y must have different pointer");
587 if (nARows*nACols==0)
return;
598 const tBoolean& isTransA,
const double* A) {
605 if (isTransA) std::swap(nRows,nCols);
611 "LAP_DoubleFullSymmetricMatrix::rankSymmetricProduct",
612 "matrices size incompatible");
645 if (nRows*nCols==0)
return;
647 if (isTrans) std::swap(nRows,nCols);
653 "LAP_DoubleFullSymmetricMatrix::rankSymmetricProduct",
654 "matrices size incompatible");
659 "LAP_DoubleFullSymmetricMatrix::rankSymmetricProduct",
660 "matrix & diagonal have incompatible size");
766 if (!leftSide) std::swap(M,P);
768 if (N!=M)
throw LAP_Exception(
"math/linalg/core",
"LAP_DoubleFullSymmetricMatrix::product()",
"incompatible size of matrix");
777 if (nBRows!=nBCols)
throw LAP_Exception(
"math/linalg/core",
"LAP_DoubleFullSymmetricMatrix::product()",
"incompatible size of matrix");
787 nBRows,nBCols,ldB,
false,B,
809 if (!leftSide) std::swap(M,P);
811 if (N!=M)
throw LAP_Exception(
"math/linalg/core",
"LAP_DoubleFullSymmetricMatrix::product()",
"incompatible size of matrix");
841 if (!leftSide) std::swap(M,P);
843 if (N!=M)
throw LAP_Exception(
"math/linalg/core",
"LAP_DoubleFullSymmetricMatrix::product()",
"incompatible size of matrix");
876 throw LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::computeEigenValues",
"matrix columns number must be greater than its rows number");
878 throw(
LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::computeEigenValues",
"matrix is non-contiguous."));
908 throw LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::computeEigenValuesDecomposition",
"matrix columns number must be greater than its rows number");
910 throw(
LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::computeEigenValuesDecomposition",
"matrix is non-contiguous."));
924 return computeEigenValueDecomposition(*
this,U);
936 tBoolean succeeds=computeEigenValueDecomposition(SA,U);
939 SP::LAP_DoubleVector v;
957 tBoolean succeeds=A.computeEigenValueDecomposition(U);
958 SP::LAP_DoubleVector v;
977 return computeEigenValueDecomposition(SA,U,*fVR);
990 const int& il,
const int& iu)
const {
992 return computeEigenValueDecomposition(C,U,VR,il,iu);
1013 throw LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::computeEigenDecomposition",
"matrix columns number must be greater than its rows number");
1015 throw(
LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::computeEigenDecomposition",
"matrix is non-contiguous."));
1018 int nEigens=ul-il+1;
1028 true,il,ul,0,0,ldz,&Z(0,0));
1048 throw(
LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::inverseMatrix",
"matrix is non-contiguous."));
1052 if (BunchKaufmanFactorization(A,ipiv))
1061 throw(
LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::inverseMatrix",
"matrix is non-contiguous."));
1073 throw(
LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::choleskyFactorization",
"matrix is non-contiguous."));
1077 SP::LAP_DoubleVector vs;
1079 if (succeeds) U->setValues(vs);
1087 throw(
LAP_Exception(
"math/linal/core",
"LAP_DoubleFullSymmetricMatrix::BunchKaufmanFactorization",
"matrix is non-contiguous."));
1107 return LAP_DoubleFullSymmetricMatrix::BunchKaufmanFactorization(*
this,ipiv);
tLVectorIndex getRowIncrement() const
get the memory distance between (*this)(i,j) & (*this)(i+1,j)
Definition: LAP_DoubleFullSymmetricMatrix.h:296
virtual void vectorProduct(const tLVectorIndex &nx, const tLVectorIncrement &incx, const double *x, const lapack_real &alpha, const lapack_real &beta, const tLVectorIndex &ny, const tLVectorIncrement &incy, double *y) const
compute Y= betaY + alpha. This. X
Definition: LAP_DoubleFullSymmetricMatrix.h:513
tBoolean DoubleFullSymmetricMatrixEigenValues(const tLVectorIndex &nRowsA, const tLVectorIndex &nColsA, const tLVectorIndex &ldA, double *A, const tLVectorIndex &nU, double *U, const tBoolean &areEigenVectorComputed)
compute the eigen values of the matrix A in U and store in A the eigen bvectors if areEigneVectorComp...
Definition: dfullsymmatrix_functions.cpp:631
virtual void setValues(SP::LAP_DoubleVector v)
set the values of the matrix to V without allocation the values array
Definition: LAP_DoubleFullSymmetricMatrix.h:256
virtual tLVectorIndex getColumnsNumber() const
get the columns number of the matrix from view
Definition: LAP_DoubleFullSymmetricMatrix.h:311
this class describes the exceptions raised for LAP package
Definition: LAP_Exception.h:14
LAP_DoubleFullSymmetricMatrix & operator-=(const lapack_real &s)
sub s to the upper matrix
Definition: LAP_DoubleFullSymmetricMatrix.h:170
LAP_DoubleMatrixStorage & getStorage()
set the storage
Definition: LAP_DoubleMatrix.h:179
this class describes a full symmetric matrix for lapack used
Definition: LAP_DoubleFullSymmetricMatrix.h:31
virtual void getColumn(const tLVectorIndex &j, SP::LAP_DoubleVector v) const
get the j-th column of this symmetric matrix in a vector
Definition: LAP_DoubleFullSymmetricMatrix.h:320
static SP::LAP_DoubleFullGeneralMatrix New()
Definition: LAP_DoubleFullGeneralMatrix.h:78
double get(const tLVectorIndex &i, const tLVectorIndex &j) const
get the value taking into account the view
Definition: LAP_DoubleMatrix.h:172
virtual void vectorProduct(const LAP_ConstDoubleVector &X, const lapack_real &alpha, const lapack_real &beta, LAP_DoubleVector &Y) const
compute Y:=betaY+alpha.This.X
Definition: LAP_DoubleFullSymmetricMatrix.h:453
this class describes a general double symmetric matrix
Definition: LAP_DoubleSymmetricMatrix.h:21
LAP_DoubleFullSymmetricMatrix & operator*=(const LAP_DoubleFullSymmetricMatrix &s)
multiply the viewed matrices term by term
Definition: LAP_DoubleFullSymmetricMatrix.h:180
DEFINE_SPTR(LAP_DoubleFullSymmetricMatrix)
LAP_DoubleFullSymmetricMatrix()
build a matrix
Definition: LAP_DoubleFullSymmetricMatrix.cpp:13
virtual tBoolean BunchKaufmanFactorization(LAP_IntegerVector &ipiv)
compute the Bunch Kaufman factorization of the full symmetric matrix A is modified such that the uppe...
Definition: LAP_DoubleFullSymmetricMatrix.h:1105
virtual void dotProduct(const LAP_DoubleVector &v)
compute the symmetric matrix S= X.tX only the upper symmetric matric is set. (lapack method dsyr call...
Definition: LAP_DoubleFullSymmetricMatrix.h:549
void matrixProduct(const LAP_DoubleFullSymmetricMatrix &B, LAP_DoubleFullGeneralMatrix &C) const
return C=(This) . B
Definition: LAP_DoubleFullSymmetricMatrix.h:701
Definition: LAP_IntegerVector.h:18
tLVectorIncrement getRowIncrement() const
get the memory distance between (*this)(i,j) & (*this)(i+1,j)
Definition: LAP_DoubleFullGeneralMatrix.h:346
virtual void setValues(const tLVectorIndex &n, const double *values)
set the values
Definition: LAP_DoubleFullSymmetricMatrix.h:271
void indexMin(tLVectorIndex &i, tLVectorIndex &j) const
get the index of the min view element in absolute value
Definition: LAP_DoubleFullSymmetricMatrix.cpp:360
static tBoolean computeEigenValues(LAP_DoubleFullSymmetricMatrix &A, LAP_DoubleVector &U)
compute the eigen values of A in ascending order and A is destroyed after method lapack method dsyev ...
Definition: LAP_DoubleFullSymmetricMatrix.h:869
LAP_DoubleFullSymmetricMatrix & operator=(const LAP_DoubleFullSymmetricMatrix &s)
init all the matrix to s
Definition: LAP_DoubleFullSymmetricMatrix.h:132
virtual tBoolean copy(const LAP_DoubleMatrix &x)
copy a matrix
Definition: LAP_DoubleMatrix.cpp:18
void matrixProduct(const LAP_DoubleFullGeneralMatrix &B, LAP_DoubleFullGeneralMatrix &C) const
return C=(This) . B
Definition: LAP_DoubleFullSymmetricMatrix.h:709
void DoubleFullSymmetricMatrixKRankSymmetricProduct(const tLVectorIndex &nRowAs, const tLVectorIndex &nColsA, const tLVectorIncrement &incA, const tLVectorIndex &ldA, const tBoolean &isTransA, const double *A, const double &alpha, const double &beta, const tLVectorIndex &nD, const tLVectorIncrement &incD, const double *D, const tLVectorIndex &nS, const tLVectorIncrement &incS, const tLVectorIndex &ldS, double *S)
compute the symmetric matrix S:= beta.S+alpha* A. tA or S=beta.S+alpha tA . A
Definition: dfullsymmatrix_functions.cpp:491
tBoolean computeEigenValueDecomposition(LAP_DoubleVector &U)
compute the eigen elements in ascending order of This the eigen vectors are set in This: This is dest...
Definition: LAP_DoubleFullSymmetricMatrix.h:923
Definition: LAP_DoubleVector.h:20
#define lapack_int
Definition: lapack_functions.h:7
virtual tBoolean computeEigenValueDecomposition(LAP_DoubleVector &U, LAP_DoubleMatrix &VR) const
compute the eigen values decomposition in acending order on This
Definition: LAP_DoubleFullSymmetricMatrix.h:971
Definition: LAP_DoubleMatrix.h:18
virtual tReal norm2() const
return norm2 sqrt(sum_ij(aij^2))=sqrt(tr(AtA));
Definition: LAP_DoubleFullSymmetricMatrix.cpp:227
void rankSymmetricProduct(const LAP_DoubleVector &D, const LAP_DoubleFullGeneralMatrix &A)
compute the symmetric matrix S:=alpha op(A).t(op(A))
Definition: LAP_DoubleFullSymmetricMatrix.h:624
const tLVectorIncrement & getRowIncrement() const
get the row increment ie the memory distance between M(i,j) & M(i+1,j)
Definition: LAP_DoubleFullStorage.h:301
virtual void setSize(const tLVectorIndex &n, const tLVectorIndex &p)
set the dimension of the matrix n x p
Definition: LAP_Matrix.h:87
virtual void getRow(const tLVectorIndex &i, LAP_DoubleVector &v) const
get the i-th row in a vector
Definition: LAP_DoubleFullSymmetricMatrix.cpp:83
tLVectorIndex getSize() const
get the size of the vector
Definition: LAP_ConstVector.h:170
virtual tLVectorIndex getViewedRowsNumber() const
get the lines number of the matrix from view
Definition: LAP_DoubleFullStorage.h:285
static tBoolean inverse(LAP_DoubleFullSymmetricMatrix &A, const LAP_IntegerVector &ipiv)
inverse a symmetric matrix dsytrf & dsytri lapack methods called
Definition: LAP_DoubleFullSymmetricMatrix.h:1059
LAP_DoubleFullStorage & getFullStorage()
GET.
Definition: LAP_DoubleFullSymmetricMatrix.h:284
LAP_DoubleFullSymmetricMatrix & operator+=(const lapack_real &s)
add s to the upper matrix
Definition: LAP_DoubleFullSymmetricMatrix.h:162
virtual SP::LAP_DoubleMatrix matrixProduct(const LAP_DoubleMatrix &B) const
return C=(This) . B
Definition: LAP_DoubleFullSymmetricMatrix.h:679
tBoolean DoubleFullSymmetricMatrixCholeskyFactorization(const tLVectorIndex &nRowsA, const tLVectorIndex &ldA, double *A)
Definition: dfullsymmatrix_functions.cpp:921
virtual void vectorProduct(const tBoolean &isTrans, const tLVectorIndex &nX, const tLVectorIncrement &incX, const double *X, const lapack_real &alpha, const lapack_real &beta, const tLVectorIndex &nY, const tLVectorIncrement &incY, double *Y) const
compute Y= op(This). X with op(A)=A or tA depending on isTrans value
Definition: LAP_DoubleFullSymmetricMatrix.h:494
#define tBoolean
Definition: types.h:48
virtual void setSize(const tLVectorIndex &n, const tLVectorIndex &p)
set the dimension of the matrix and allocate the values array
Definition: LAP_DoubleFullGeneralMatrix.h:230
#define lapack_real
Definition: lapack_functions.h:9
LAP_DoubleFullSymmetricMatrix & operator/=(const lapack_real &s)
divide by s the matrix v
Definition: LAP_DoubleFullSymmetricMatrix.h:155
virtual tReal sum(const tFlag &d, LAP_DoubleVector &s) const
make the sum among the direction if (d==ROW) sum all the columns of each row and size of s is the num...
Definition: LAP_DoubleFullSymmetricMatrix.cpp:261
virtual tLVectorIndex getRowsNumber() const
get the lines number of the matrix from view
Definition: LAP_DoubleFullGeneralMatrix.h:366
static SP::LAP_DoubleFullUpperMatrix New()
Definition: LAP_DoubleFullUpperMatrix.h:63
tBoolean inverse()
inverse the matrix
Definition: LAP_DoubleFullSymmetricMatrix.h:1037
virtual tBoolean computeEigenValues(LAP_DoubleVector &U) const
compute the eigen values of This: A is copied in ascending order
Definition: LAP_DoubleFullSymmetricMatrix.h:889
virtual SP::LAP_DoubleMatrix NewInstance() const
create a New instance of this
Definition: LAP_DoubleFullSymmetricMatrix.h:96
#define null
Definition: types.h:13
const tLVectorIncrement & getIncrement() const
get the increment of the vector
Definition: LAP_Vector.h:529
static void matrixProduct(const tBoolean &leftSide, const LAP_DoubleFullSymmetricMatrix &S, const LAP_DoubleFullGeneralMatrix &B, const lapack_real &alpha, const lapack_real &beta, LAP_DoubleFullGeneralMatrix &C)
make the product C = alpha. S . B +beta C if leftSide=true C = alpha. B . S +beta C if leftSide=false...
Definition: LAP_DoubleFullSymmetricMatrix.h:797
void rankSymmetricProduct(const LAP_DoubleVector &D, const double &alpha, const tBoolean &isTrans, const LAP_DoubleFullGeneralMatrix &A)
compute the symmetric matrix S:=alpha op(A).t(op(A))
Definition: LAP_DoubleFullSymmetricMatrix.h:629
virtual void rankSymmetricProduct(const double &alpha, const double &beta, const tBoolean &isTrans, const LAP_DoubleFullGeneralMatrix &A)
compute the symmetric matrix S:=beta.S+ alpha op(A).t(op(A)) only the upper symmetric matric is set...
Definition: LAP_DoubleFullSymmetricMatrix.h:581
tBoolean computeEigenValueDecomposition(LAP_DoubleVector &U, LAP_DoubleFullGeneralMatrix &VR) const
compute the eigen values in ascending order decomposition on this:
Definition: LAP_DoubleFullSymmetricMatrix.h:933
tBoolean DoubleFullSymmetricMatrixBunchKaufmanFactorization(const tLVectorIndex &nRows, const tLVectorIndex &ldA, double *A, lapack_int *ipiv)
Definition: dfullsymmatrix_functions.cpp:986
virtual void getRow(const tLVectorIndex &i, SP::LAP_DoubleVector v) const
get the i-th row in a vector
Definition: LAP_DoubleFullSymmetricMatrix.h:343
static tBoolean computeEigenValueDecomposition(LAP_DoubleFullSymmetricMatrix &A, LAP_DoubleVector &U, LAP_DoubleFullGeneralMatrix &Z, const lapack_int &il, const lapack_int &ul)
compute the eigen elements of A in ascending order . A is supposed to be symmetric, the eigen vectors are set in Z, A must be symmetric. only the eigen values & vectors are computed in index il and iu when the iegen values are ordering in an ascent order.
Definition: LAP_DoubleFullSymmetricMatrix.h:1003
void init(const double &v)
init the values
Definition: LAP_DoubleMatrixStorage.h:124
LAP_DoubleFullSymmetricMatrix & operator+=(const LAP_DoubleFullSymmetricMatrix &s)
add the viewed matrix
Definition: LAP_DoubleFullSymmetricMatrix.h:199
virtual void setSize(const tLVectorIndex &n)
set the dimension of the matrix and alocate the values array
Definition: LAP_DoubleFullSymmetricMatrix.h:247
virtual tLVectorIndex getRowsNumber() const
get the lines number of the matrix from view
Definition: LAP_DoubleFullSymmetricMatrix.h:306
virtual void setValues(const tLVectorIndex &n, const double *values)
copy the values to the matrix values
Definition: LAP_DoubleFullStorage.h:195
tBoolean DoubleFullSymmetricMatrixInverse(const tLVectorIndex &nRows, const tLVectorIndex &ldA, double *A, const lapack_int *ipiv)
Definition: dfullsymmatrix_functions.cpp:1077
Definition: LAP_DoubleFullGeneralMatrix.h:30
virtual double & operator()(const tLVectorIndex &i, const tLVectorIndex &j)
accessor of element at row i and column j taking into account the view only use the upper diagonal ...
Definition: LAP_DoubleFullSymmetricMatrix.h:107
static SP::LAP_DoubleFullSymmetricMatrix Identity(const tLVectorIndex &nRows)
create an identity matrix
Definition: LAP_DoubleFullSymmetricMatrix.h:81
tLVectorIndex getSize() const
get the size of the vector
Definition: LAP_Vector.h:519
virtual const double & operator()(const tLVectorIndex &i, const tLVectorIndex &j) const
accessor of element at row i and column j taking into account the view only use the upper diagonal ...
Definition: LAP_DoubleFullSymmetricMatrix.h:114
virtual void getValuesPointer(SP::LAP_DoubleVector &v)
Definition: LAP_DoubleMatrixStorage.h:208
void rankSymmetricProduct(const LAP_DoubleFullGeneralMatrix &A)
compute the symmetric matrix S:=alpha op(A).t(op(A))
Definition: LAP_DoubleFullSymmetricMatrix.h:568
virtual void vectorProduct(const LAP_DoubleVector &X, LAP_DoubleVector &Y)
compute Y=A.X
Definition: LAP_DoubleFullSymmetricMatrix.h:408
static SP::LAP_DoubleFullSymmetricMatrix New()
Definition: LAP_DoubleFullSymmetricMatrix.h:66
virtual void setValuesNumber(const tLVectorIndex &nRows, const tLVectorIndex &n)
set the values number
Definition: LAP_DoubleFullStorage.h:213
virtual void setSize(const tLVectorIndex &n, const tLVectorIndex &p)
set the dimension of the matrix and allocate the values array
Definition: LAP_DoubleFullSymmetricMatrix.h:231
virtual tLVectorIndex getViewedColumnsNumber() const
get the columns number of the matrix from view
Definition: LAP_DoubleFullStorage.h:290
virtual void rankSymmetricProduct(const LAP_DoubleVector &D, const double &alpha, const double &beta, const tBoolean &isTrans, const LAP_DoubleFullGeneralMatrix &A)
compute the symmetric matrix S:=beta.S+ alpha op(A).t(op(A)) only the upper symmetric matric is set...
Definition: LAP_DoubleFullSymmetricMatrix.h:637
LAP_DoubleFullSymmetricMatrix & operator*=(const lapack_real &s)
multiply by s the matrix
Definition: LAP_DoubleFullSymmetricMatrix.h:149
virtual void dotProduct(const double &alpha, const LAP_DoubleVector &X)
compute the symmetric matrix S:= alpha X.tX only the upper symmetric matric is set. (lapack method dsyr called)
Definition: LAP_DoubleFullSymmetricMatrix.h:556
Definition: LAP_DoubleFullStorage.h:29
virtual tReal max(const tFlag &d, const tLVectorIndex &index) const
make get max among the direction if (d==ROW) max of all the columns of row index if (d==COL) max of a...
Definition: LAP_DoubleFullSymmetricMatrix.cpp:330
tBoolean computeEigenValueDecomposition(LAP_DoubleVector &U, LAP_DoubleFullGeneralMatrix &VR, const int &il, const int &iu) const
compute the eigen elements in ascending order of This supposed to be symmetric, the eigen vectors are...
Definition: LAP_DoubleFullSymmetricMatrix.h:988
void getColumnByReference(const tLVectorIndex &j, LAP_DoubleVector &v)
get the column by reference the values of v pointer to the values of the column j of this ...
Definition: LAP_DoubleFullSymmetricMatrix.h:328
const LAP_DoubleFullStorage & getFullStorage() const
get the full storage
Definition: LAP_DoubleFullSymmetricMatrix.h:289
virtual void matrixProduct(const tBoolean &leftSide, const tLVectorIndex &nBRows, const tLVectorIndex &nBCols, const tLVectorIncrement &incB, const tLVectorIndex &ldB, const double *B, const lapack_real &alpha, const lapack_real &beta, LAP_DoubleFullGeneralMatrix &C) const
make the product:
Definition: LAP_DoubleFullSymmetricMatrix.h:750
void DoubleFullSymmetricMatrixRankSymmetricProduct(const tLVectorIncrement &incX, const double *X, const double &alpha, const tLVectorIndex &nS, const tLVectorIndex &ldS, double *S)
compute the symmetric matrix S+=alpha X tX
Definition: dfullsymmatrix_functions.cpp:414
#define tLVectorIndex
Definition: lapack_types.h:13
this class describes a packed symmetric matrix for lapack used where values are stored in vector: {A(...
Definition: LAP_DoublePackedSymmetricMatrix.h:31
virtual void vectorProduct(const LAP_DoubleVector &X, const lapack_real &alpha, const lapack_real &beta, LAP_DoubleVector &Y) const
compute Y:=betaY+alpha.This.X
Definition: LAP_DoubleFullSymmetricMatrix.h:418
tLVectorIndex getLeadingDimension() const
get the memory distance between (*this)(i,j) & (*this)(i,j+1)
Definition: LAP_DoubleFullSymmetricMatrix.h:301
const tLVectorIncrement & getIncrement() const
get the increment of the vector
Definition: LAP_ConstVector.h:175
virtual void getColumn(const tLVectorIndex &j, LAP_DoubleVector &v) const
get the j-th column of this symmetric matrix in a vector
Definition: LAP_DoubleFullSymmetricMatrix.cpp:126
LAP_DoubleFullSymmetricMatrix & operator^=(const lapack_real &s)
power by s the matrix v
Definition: LAP_DoubleFullSymmetricMatrix.h:142
void getColumnByReference(const tLVectorIndex &j, LAP_ConstDoubleVector &v) const
get the column by reference the values of v pointer to the values of the column j of this ...
Definition: LAP_DoubleFullSymmetricMatrix.h:334
tLVectorIndex getLeadingDimension() const
get the memory distance between (*this)(i,j) & (*this)(i,j+1)
Definition: LAP_DoubleFullGeneralMatrix.h:351
LAP_DoubleFullSymmetricMatrix & operator/=(const LAP_DoubleFullSymmetricMatrix &s)
divide the viewed matrices term by term
Definition: LAP_DoubleFullSymmetricMatrix.h:186
static tBoolean computeEigenValueDecomposition(LAP_DoubleFullSymmetricMatrix &A, LAP_DoubleVector &U, LAP_DoubleFullGeneralMatrix &VR)
compute the eigen elements of A in ascedning order the eigen vectors are set in A: A is destroyed IN ...
Definition: LAP_DoubleFullSymmetricMatrix.h:953
virtual ~LAP_DoubleFullSymmetricMatrix()
destroy a matrix
Definition: LAP_DoubleFullSymmetricMatrix.cpp:27
virtual tLVectorIndex getColumnsNumber() const
get the columns number of the matrix from view
Definition: LAP_DoubleFullGeneralMatrix.h:371
Definition: CORE_Pointers.h:51
void rankSymmetricProduct(const double &alpha, const tBoolean &isTrans, const LAP_DoubleFullGeneralMatrix &A)
compute the symmetric matrix S:=alpha op(A).t(op(A))
Definition: LAP_DoubleFullSymmetricMatrix.h:573
virtual void setValuesPointer(SP::LAP_DoubleVector v)
set the values of without copying
Definition: LAP_DoubleFullStorage.h:180
LAP_DoubleFullSymmetricMatrix & operator=(const double &s)
init all the matrix to s
Definition: LAP_DoubleFullSymmetricMatrix.h:126
void DoubleFullSymmetricMatrixMatrixProduct(const tBoolean &isLeftSide, const tLVectorIndex &nRowsA, const tLVectorIndex &ldA, const double *A, const tLVectorIndex &nRowsB, const tLVectorIndex &nColsB, const tLVectorIndex &ldB, const tBoolean &isBSymmetric, const double *B, const lapack_real &alpha, const lapack_real &beta, const tLVectorIndex &nRowsC, const tLVectorIndex &nColsC, const tLVectorIndex &ldC, double *C)
compute matric matrix product
Definition: dfullsymmatrix_functions.cpp:258
virtual void matrixProduct(const tBoolean &leftSide, const LAP_DoubleFullGeneralMatrix &B, const lapack_real &alpha, const lapack_real &beta, LAP_DoubleFullGeneralMatrix &C) const
make the product C = alpha. This . B +beta C if leftSide=true C = alpha. B . This +beta C if leftSide...
Definition: LAP_DoubleFullSymmetricMatrix.h:728
virtual void setValues(const tLVectorIndex &n, const tLVectorIndex &p, SP::LAP_DoubleVector v)
set the values of the matrix to V without allocation the values array
Definition: LAP_DoubleFullGeneralMatrix.h:254
virtual void rankSymmetricProduct(const double &alpha, const double &beta, const tLVectorIndex &nARows, const tLVectorIndex &nACols, const tLVectorIncrement &incA, const tLVectorIndex &ldA, const tBoolean &isTransA, const double *A)
compute the symmetric matrix S:=beta.S+ alpha op(A).t(op(A)) only the upper symmetric matric is set...
Definition: LAP_DoubleFullSymmetricMatrix.h:596
void copyUpperToLowerSubMatrix()
copy the upper part to the lower part of the matrix
Definition: LAP_DoubleFullSymmetricMatrix.cpp:31
virtual void getColumnByReference(const tLVectorIndex &j, LAP_DoubleVector &v)
get the column by reference the values of v pointer to the values of the column j of this ...
Definition: LAP_DoubleFullStorage.cpp:1097
static void matrixProduct(const tBoolean &leftSide, const LAP_DoubleFullSymmetricMatrix &S1, const LAP_DoubleFullSymmetricMatrix &S2, const lapack_real &alpha, const lapack_real &beta, LAP_DoubleFullGeneralMatrix &C)
make the product C = alpha. S1 . S2 +beta C if leftSide=true C = alpha. S2 . S1 +beta C if leftSide=f...
Definition: LAP_DoubleFullSymmetricMatrix.h:832
static SP::LAP_DoubleFullSymmetricMatrix New(const tLVectorIndex &n)
Definition: LAP_DoubleFullSymmetricMatrix.h:73
virtual SP::LAP_DoubleUpperMatrix choleskyFactorization()
compute the choleskey factorization of the full symmetric matrix A is modified such that the upper ma...
Definition: LAP_DoubleFullSymmetricMatrix.h:1099
#define tLVectorIncrement
Definition: lapack_types.h:16
tLVectorIndex getLeadingDimension() const
get the leading dimension ie the memory distance between M(i,j) & M(i,j+1)
Definition: LAP_DoubleFullStorage.h:296
Definition: LAP_ConstDoubleVector.h:25
#define tReal
Definition: types.h:18
virtual void matrixProduct(const LAP_DoubleFullGeneralMatrix &B, const lapack_real &alpha, const lapack_real &beta, LAP_DoubleFullGeneralMatrix &C) const
return C=(This) . B (lefside=true) or B. (this) (lefside=false)
Definition: LAP_DoubleFullSymmetricMatrix.h:717
virtual SP::LAP_DoubleVector vectorProduct(const LAP_DoubleVector &X) const
compute This. X
Definition: LAP_DoubleMatrix.h:328
LAP_DoubleFullSymmetricMatrix & operator-=(const LAP_DoubleFullSymmetricMatrix &s)
sub the viewed matrix
Definition: LAP_DoubleFullSymmetricMatrix.h:193
void resetView()
set the view of the vector to all the values
Definition: LAP_Vector.h:352
void DoubleFullSymmetricMatrixVectorProduct(const tLVectorIndex &nX, const tLVectorIncrement &incX, const double *x, const tLVectorIndex &nRows, const tLVectorIndex &ldA, const double *A, const lapack_real &alpha, const lapack_real &beta, const tLVectorIndex &nY, const tLVectorIncrement &incY, double *y)
compute Y=beta.Y + alpha A X
Definition: dfullsymmatrix_functions.cpp:162
static tBoolean inverse(LAP_DoubleFullSymmetricMatrix &A)
inverse a symmetric matrix dsytrf & dsytri lapack methods called
Definition: LAP_DoubleFullSymmetricMatrix.h:1046
tBoolean DoubleFullSymmetricMatrixBoundedEigenValues(const tLVectorIndex &nRowsA, const tLVectorIndex &nColsA, const tLVectorIndex &ldA, double *A, const tLVectorIndex &nU, double *U, const tBoolean &areEigenVectorComputed, const tLVectorIndex &minIndex, const tLVectorIndex &maxIndex, const double &minBound, const double &maxBound, const tLVectorIndex &ldZ, double *Z)
compute only selected eigen values of the matrix A in U and store in Z the eigen vectors if areEigneV...
Definition: dfullsymmatrix_functions.cpp:733
void setSize(const tLVectorIndex &n)
set the view to [0,n[ by 1 increment if values is too small, re-alocate it
Definition: LAP_Vector.h:360
#define ASSERT_IN(a)
Definition: types.h:96
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106
#define tFlag
Definition: types.h:14