1.4.0
CCC
 
MatrixFactory Class Reference

#include <MatrixFactory.hpp>

Static Public Member Functions

static AMatrixprodMatMat (const AMatrix *x, const AMatrix *y, bool transposeX=false, bool transposeY=false)
 TODO : Use smartpointer. More...
 
template<typename T >
static TprodMatMat (const AMatrix *x, const AMatrix *y, bool transposeX=false, bool transposeY=false)
 
static AMatrixSquarecreateMatrixSquare (const AMatrixSquare *x, int nrow)
 
static AMatrixcreateReduce (const AMatrix *x, const VectorInt &selRows=VectorInt(), const VectorInt &selCols=VectorInt(), bool flagKeepRows=true, bool flagKeepCols=true)
 
static AMatrixcreateReduceOne (const AMatrix *x, int selRow=-1, int selCol=-1, bool flagKeepRow=true, bool flagKeepCol=true)
 
static AMatrixcreateGlue (const AMatrix *a1, const AMatrix *a2, bool flagShiftRow, bool flagShiftCol)
 

Member Function Documentation

◆ createGlue()

AMatrix * MatrixFactory::createGlue ( const AMatrix a1,
const AMatrix a2,
bool  flagShiftRow,
bool  flagShiftCol 
)
static

Concatenate two matrices

Returns
Pointer on the newly created concatenated matrix (or NULL)
Parameters
[in]a1Pointer to the first matrix
[in]a2Pointer to the second matrix
[in]flagShiftRowConcatenate by Row
[in]flagShiftColConcatenate by Column

◆ createMatrixSquare()

AMatrixSquare * MatrixFactory::createMatrixSquare ( const AMatrixSquare x,
int  nrow 
)
static

Create a Matrix similar to the input one with a given row number

Returns
Pointer to the newly created AMatrix matrix
Parameters
[in]xFirst AMatrix matrix
[in]nrowNumber of rows

TODO : use typeinfo

◆ createReduce()

AMatrix * MatrixFactory::createReduce ( const AMatrix x,
const VectorInt selRows = VectorInt(),
const VectorInt selCols = VectorInt(),
bool  flagKeepRows = true,
bool  flagKeepCols = true 
)
static

Create a submatrix from an input matrix by specifying the list of rows and columns to be extracted or excluded

Parameters
xInput matrix
selRowsList of selected rows
selColsList of selected columns
flagKeepRowsTrue if the selected rows must be kept (they must be excluded otherwise)
flagKeepColsTrue if the selected columns must be kept (they must be excluded otherwise)
Returns
Remarks
If a list if not defined, the whole set of rows (resp. columns) is considered)
(this assumes that flagKeep is True)

TODO : use typeinfo

◆ createReduceOne()

AMatrix * MatrixFactory::createReduceOne ( const AMatrix x,
int  selRow = -1,
int  selCol = -1,
bool  flagKeepRow = true,
bool  flagKeepCol = true 
)
static

Create a submatrix from an input matrix by specifying the row and or column to be extracted or excluded

Parameters
xInput matrix
selRowRank of the selected row
selColRank of the selected column
flagKeepRowTrue if the selected row must be kept (it must be excluded otherwise)
flagKeepColTrue if the selected column must be kept (it must be excluded otherwise)
Returns
Remarks
If a rank is negative, the whole set of rows (resp. columns) is considered)
(this assumes that flagKeep is True)

◆ prodMatMat() [1/2]

AMatrix * MatrixFactory::prodMatMat ( const AMatrix x,
const AMatrix y,
bool  transposeX = false,
bool  transposeY = false 
)
static

TODO : Use smartpointer.

Performs the product of two matrices: X * Y

Returns
Pointer to the newly created AMatrix matrix
Parameters
[in]xFirst AMatrix matrix
[in]ySecond AMatrix matrix
[in]transposeXTrue if First matrix is transposed
[in]transposeYTrue if Second matrix is transposed

◆ prodMatMat() [2/2]

template<typename T >
T * MatrixFactory::prodMatMat ( const AMatrix x,
const AMatrix y,
bool  transposeX = false,
bool  transposeY = false 
)
static

Performs the product of two matrices: X * Y

Returns
Pointer to the newly created AMatrix matrix
Parameters
[in]xFirst AMatrix matrix
[in]ySecond AMatrix matrix
[in]transposeXTrue if First matrix is transposed
[in]transposeYTrue if Second matrix is transposed
Remarks
: To be called as follows: MatrixSparse* mat = MatrixFactory::prodMatMat<MatrixSparse>(x, y);

TODO : Why 2 methods for MatrixFactory::prodMatMat ?

TODO : if MatrixSparse => x or y 'eigen flag' is ignored


The documentation for this class was generated from the following files: