1 #ifndef LAP_DoubleFullStorage_H
2 #define LAP_DoubleFullStorage_H
75 inline static SP::LAP_DoubleFullStorage
New() {
196 const double* values) {
205 const double* values) {
242 if (increment==0)
return false;
243 if (end<start)
return false;
244 if (end-increment>s)
return false;
245 mView[k].
setView(start,end,increment);
334 virtual double trace()
const;
LAP_DoubleFullStorage & multiplyBy(const tBoolean &isPackedSymmetric, const LAP_DoublePackedStorage &s)
multiply the matrices viewed term by term taking into account the view
Definition: LAP_DoubleFullStorage.cpp:701
tLVectorIndex getViewIndex(const tLVectorIndex &k, const tLVectorIndex &i) const
get the view index of col or row
Definition: LAP_DoubleFullStorage.h:279
this class describes a packed storage by column
Definition: LAP_DoublePackedStorage.h:21
virtual void setValuesPointer(SP::LAP_DoubleVector v)
set the vector values by reference
Definition: LAP_DoubleMatrixStorage.h:132
static const tFlag COL
Definition: LAP_Matrix.h:22
Definition: LAP_DoubleVector.h:20
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 ~LAP_DoubleFullStorage()
destroy a matrix
Definition: LAP_DoubleFullStorage.h:63
virtual tLVectorIndex getViewedRowsNumber() const
get the lines number of the matrix from view
Definition: LAP_DoubleFullStorage.h:285
tBoolean copyPackStorage(const tBoolean &isSymmetric, const tBoolean &isUpper, const tLVectorIndex &nX, const double *x)
copy packed storage
Definition: LAP_DoubleFullStorage.cpp:153
void resetView()
reset view
Definition: LAP_DoubleFullStorage.h:251
#define tBoolean
Definition: types.h:48
tBoolean isSubmatrixView() const
return true if the matrix is the sub matrix view
Definition: LAP_DoubleFullStorage.h:307
static const tFlag ROW
Definition: LAP_Matrix.h:21
void removeColumn(const tLVectorIndex &j)
remove the column at index j
Definition: LAP_DoubleFullStorage.cpp:1128
virtual void addDiagonal(const double &alpha)
add alpha to the diagnal element
Definition: LAP_DoubleFullStorage.cpp:977
const tLVectorIndex & getStart(const tFlag &d) const
get the start index of the view of the matrix
Definition: LAP_DoubleFullStorage.h:272
LAP_DoubleFullStorage & add(const tBoolean &isPackedSymmetric, const LAP_DoublePackedStorage &s)
add the matrices viewed term by term taking into account the view
Definition: LAP_DoubleFullStorage.cpp:845
tLVectorIndex getRowSize() const
get rows number
Definition: LAP_DoubleFullStorage.h:323
virtual void getRowByReference(const tLVectorIndex &i, LAP_DoubleVector &v)
get the row by reference the values of v pointer to the values of the column j of this ...
Definition: LAP_DoubleFullStorage.cpp:1038
virtual void setValuesNumber(const tLVectorIndex &n)
set the values number
Definition: LAP_DoubleMatrixStorage.h:155
virtual void setValues(const tLVectorIndex &n, const double *values)
copy the values to the matrix values
Definition: LAP_DoubleFullStorage.h:195
tBoolean copyBandStorage(const tBoolean &isSymmetric, const tBoolean &isUpper, const tLVectorIndex &nX, const tLVectorIndex &nUpperBands, const tLVectorIndex &nLowerBands, const double *x)
copy banded storage
Definition: LAP_DoubleFullStorage.cpp:207
LAP_DoubleFullStorage & operator^=(const double &s)
sub s to the matrix viewed term by term taking into account the view
Definition: LAP_DoubleFullStorage.cpp:352
DEFINE_SPTR(LAP_DoubleFullStorage)
virtual const double & operator()(const tLVectorIndex &i, const tLVectorIndex &j) const
accessor of element at row i and column j
Definition: LAP_DoubleFullStorage.h:93
void swapColumns(const tLVectorIndex &i, const tLVectorIndex &j)
swap the column i & j
Definition: LAP_DoubleFullStorage.cpp:1175
void merge(const T &alpha, const LAP_Vector< T > &x, const T &beta, const LAP_Vector< T > &y)
this is the merging of 2 vectors This = [alpha.x,beta.y]
Definition: LAP_Vector.hpp:96
tBoolean setView(const tFlag &k, const tLVectorIndex &start, const tLVectorIndex &end, const tLVectorIndex &increment)
set the the view the row/column element considered are in [start,end[ with increment inc ...
Definition: LAP_DoubleFullStorage.h:235
LAP_DoubleFullStorage & divideBy(const tBoolean &isPackedSymmetric, const LAP_DoublePackedStorage &s)
divide the matrices viewed term by term taking into account the view
Definition: LAP_DoubleFullStorage.cpp:770
virtual void setValuesNumber(const tLVectorIndex &nRows, const tLVectorIndex &n)
set the values number
Definition: LAP_DoubleFullStorage.h:213
virtual tLVectorIndex getViewedColumnsNumber() const
get the columns number of the matrix from view
Definition: LAP_DoubleFullStorage.h:290
void setView(const tFlag &k, const tLVectorIndex &start, const tLVectorIndex &end, const tLVectorIncrement &inc)
set the indices in direction k
Definition: LAP_2DView.h:97
void reverseColumns()
reverese the column order
Definition: LAP_DoubleFullStorage.cpp:1136
virtual void setValuesPointer(const tLVectorIndex &rowSize, SP::LAP_DoubleVector v)
set the values of without copying
Definition: LAP_DoubleFullStorage.h:188
virtual double & operator()(const tLVectorIndex &i, const tLVectorIndex &j)
accessor of element at row i and column j taking into account the row
Definition: LAP_DoubleFullStorage.h:87
Definition: LAP_DoubleFullStorage.h:29
virtual double trace() const
return the sum of the diagonal element
Definition: LAP_DoubleFullStorage.cpp:1005
virtual void setValues(const tLVectorIndex &rowSize, const tLVectorIndex &n, const double *values)
copy the values to the matrix values without taking account of the view
Definition: LAP_DoubleFullStorage.h:203
const tLVectorIndex & getStart(const tFlag &d) const
get the start index in direction k
Definition: LAP_2DView.h:122
tLVectorIndex getValuesNumber() const
get the number of values
Definition: LAP_DoubleMatrixStorage.h:178
LAP_DoubleFullStorage & operator/=(const double &s)
divide by s the matrix viewed term by term taking into account the view
Definition: LAP_DoubleFullStorage.cpp:449
virtual tBoolean copy(const tBoolean &isSymmetric, const tBoolean &isUpper, const tBoolean &isTransposed, const LAP_DoubleMatrixStorage &x)
copy he viewed terms of the matrix to this
Definition: LAP_DoubleFullStorage.cpp:12
#define tLVectorIndex
Definition: lapack_types.h:13
const tLVectorIncrement & getIncrement(const tFlag &d) const
get increment in direction k
Definition: LAP_2DView.h:117
const tLVectorIndex & getEnd(const tFlag &d) const
get the end index in direction k
Definition: LAP_2DView.h:127
LAP_DoubleFullStorage & operator*=(const double &s)
multiply by s the matrix viewed term by term taking into account the view
Definition: LAP_DoubleFullStorage.cpp:420
const LAP_DoubleVector & getValues() const
get the vector values of the matrix
Definition: LAP_DoubleMatrixStorage.h:197
LAP_DoubleFullStorage & operator+=(const double &s)
add s to the matrix viewed term by term taking into account the view
Definition: LAP_DoubleFullStorage.cpp:460
LAP_DoubleFullStorage()
build a matrix
Definition: LAP_DoubleFullStorage.h:56
virtual pair< tLVectorIndex, tLVectorIndex > computeBandsNumber() const
compute the bands number of the storage
Definition: LAP_DoubleFullStorage.cpp:1202
virtual void setValuesNumber(const tLVectorIndex &n)
set the values number
Definition: LAP_DoubleFullStorage.h:221
This class is a matrix view.
Definition: LAP_2DView.h:14
virtual void setValuesPointer(SP::LAP_DoubleVector v)
set the values of without copying
Definition: LAP_DoubleFullStorage.h:180
static SP::LAP_DoubleFullStorage New()
create a new full storage class
Definition: LAP_DoubleFullStorage.h:75
tBoolean copyFullStorage(const tBoolean &isSymmetric, const tBoolean &isUpper, const tLVectorIndex &nViewedRows, const tLVectorIndex &nViewedCols, const tLVectorIncrement &incx, const tLVectorIndex &ldx, const double *x)
copy full storage
Definition: LAP_DoubleFullStorage.cpp:49
LAP_DoubleFullStorage & sub(const tBoolean &isPackedSymmetric, const LAP_DoublePackedStorage &s)
sub the matrices viewed term by term taking into account the view
Definition: LAP_DoubleFullStorage.cpp:910
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
LAP_DoubleFullStorage & operator-=(const double &s)
sub s to the matrix viewed term by term taking into account the view
Definition: LAP_DoubleFullStorage.cpp:487
#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
Definition: LAP_DoubleMatrixStorage.h:16
#define tReal
Definition: types.h:18
const tLVectorIncrement & getIncrement(const tFlag &d) const
get the increment of the view of the matrix
Definition: LAP_DoubleFullStorage.h:266
tLVectorIndex getSize(const tFlag &d) const
Definition: LAP_2DView.h:133
void concat(const double &alpha, const LAP_DoubleFullStorage &X, const double &beta, const LAP_DoubleFullStorage &Y)
concat This-> [alpha X, beta Y] add the colmuns of Y to the columns of X to becomes A ...
Definition: LAP_DoubleFullStorage.h:370
virtual void setValues(const tLVectorIndex &n, const double *values)
copy the values
Definition: LAP_DoubleMatrixStorage.h:145
tLVectorIndex getViewSize(const tFlag &d) const
get the length of the view of the matrix
Definition: LAP_DoubleFullStorage.h:260
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106
#define tFlag
Definition: types.h:14