![]() |
imate
C++/CUDA Reference
|
Container for dense affine matrix functions of one parameter. More...
#include <c_dense_affine_matrix_function.h>


Public Member Functions | |
| cDenseAffineMatrixFunction (const DataType *A_, const LongIndexType num_rows_, const LongIndexType num_columns_, const FlagType A_is_row_major_, const FlagType A_is_symmetric_) | |
| Default constructor. | |
| cDenseAffineMatrixFunction (const DataType *A_, const LongIndexType num_rows_, const LongIndexType num_columns_, const FlagType A_is_row_major_, const FlagType A_is_symmetric_, const DataType *B_, const FlagType B_is_row_major_, const FlagType B_is_symmetric_) | |
| Constructor. | |
| virtual | ~cDenseAffineMatrixFunction () |
| Destructor. | |
| virtual void | set_symmetry (const FlagType symmetric) |
| Specify whether the matrices are symmetic or non-symmetric. | |
| virtual void | dot (const DataType *vector, DataType *product) |
| Matrix vector product. | |
| virtual void | transpose_dot (const DataType *vector, DataType *product) |
| Matrix vector product written in place. | |
Public Member Functions inherited from cAffineMatrixFunction< DataType > | |
| cAffineMatrixFunction () | |
| Constructor. | |
| virtual | ~cAffineMatrixFunction () |
| Virtual destructor. | |
| DataType | get_eigenvalue (const DataType *known_parameters, const DataType known_eigenvalue, const DataType *inquiry_parameters) const |
| This function defines an analytic relationship between a given set of parameters and the corresponding eigenvalue of the operator. Namely, given a set of parameters and a known eigenvalue of the operator for that specific set of parameters, this function obtains the eigenvalue of the operator for an other given set of parameters. | |
Public Member Functions inherited from cLinearOperator< DataType > | |
| cLinearOperator () | |
| Default constructor. | |
| virtual | ~cLinearOperator () |
| Destructor. | |
| void | set_parameters (DataType *parameters_) |
Sets the scalar parameter this->parameters. Parameter is initialized to NULL. However, before calling dot or transpose_dot functions, the parameters must be set. | |
Public Member Functions inherited from cLinearOperatorBase | |
| cLinearOperatorBase () | |
| Default constructor. | |
| cLinearOperatorBase (const LongIndexType num_rows_, const LongIndexType num_columns_) | |
Constructor with setting num_rows and num_columns. | |
| virtual | ~cLinearOperatorBase () |
| Destructor. | |
| LongIndexType | get_num_rows () const |
| Returns the number of rows of the matrix. | |
| LongIndexType | get_num_columns () const |
| Returns the number of columns of the matrix. | |
| IndexType | get_num_parameters () const |
| Returns the number of parameters of the linear operator. | |
| FlagType | is_eigenvalue_relation_known () const |
| Returns a flag that determines whether a relation between the parameters of the operator and its eigenvalue(s) is known. | |
Protected Attributes | |
| cDenseMatrix< DataType > | A |
| cDenseMatrix< DataType > | B |
Protected Attributes inherited from cAffineMatrixFunction< DataType > | |
| bool | B_is_identity |
Protected Attributes inherited from cLinearOperator< DataType > | |
| DataType * | parameters |
Protected Attributes inherited from cLinearOperatorBase | |
| const LongIndexType | num_rows |
| const LongIndexType | num_columns |
| FlagType | eigenvalue_relation_known |
| IndexType | num_parameters |
Additional Inherited Members | |
Protected Member Functions inherited from cAffineMatrixFunction< DataType > | |
| void | _add_scaled_vector (const DataType *input_vector, const LongIndexType vector_size, const DataType scale, DataType *output_vector) const |
| Performs the operation \( \boldsymbol{c} = \boldsymbol{c} +
\alpha \boldsymbol{b} \), where \( \boldsymbol{b} \) is an input vector scaled by \( \alpha \) and \(
\boldsymbol{c} \) it the output vector. | |
Container for dense affine matrix functions of one parameter.
The cDenseAffineMatrixFunction contains two-dimensional dense matrices A and B. This operoator can perofrom matrix-vector product and transposed matrix-vector product.
Definition at line 45 of file c_dense_affine_matrix_function.h.
| cDenseAffineMatrixFunction< DataType >::cDenseAffineMatrixFunction | ( | const DataType * | A_, |
| const LongIndexType | num_rows_, | ||
| const LongIndexType | num_columns_, | ||
| const FlagType | A_is_row_major_, | ||
| const FlagType | A_is_symmetric_ | ||
| ) |
Default constructor.
Matrix B is assumed to be the identity matrix.
| [in] | A_ | 1D array that represents a 2D dense array with either C (row) major ordering or Fortran (column) major ordering. The major ordering should de defined by A_is_row_major flag. |
| [in] | num_rows_ | Number of rows of A and B |
| [in] | num_columns_ | Number of columns of A and B |
| [in] | A_is_row_major_ | Boolean, can be 0 or 1 as follows:
|
| [in] | A_is_symmetric_ | Boolean. If A is symmetric, set this value to 1, otherwise 0. |
Definition at line 48 of file c_dense_affine_matrix_function.cpp.
References cAffineMatrixFunction< DataType >::B_is_identity, and cLinearOperatorBase::eigenvalue_relation_known.
| cDenseAffineMatrixFunction< DataType >::cDenseAffineMatrixFunction | ( | const DataType * | A_, |
| const LongIndexType | num_rows_, | ||
| const LongIndexType | num_columns_, | ||
| const FlagType | A_is_row_major_, | ||
| const FlagType | A_is_symmetric_, | ||
| const DataType * | B_, | ||
| const FlagType | B_is_row_major_, | ||
| const FlagType | B_is_symmetric_ | ||
| ) |
Constructor.
Matrix B is assumed to be the identity matrix.
| [in] | A_ | 1D array that represents a 2D dense array with either C (row) major ordering or Fortran (column) major ordering. The major ordering should de defined by A_is_row_major flag. |
| [in] | num_rows_ | Number of rows of A and B |
| [in] | num_columns_ | Number of columns of A and B |
| [in] | A_is_row_major_ | Boolean, can be 0 or 1 as follows:
|
| [in] | A_is_symmetric_ | Boolean. If A is symmetric, set this value to 1, otherwise 0. |
| [in] | B_ | 1D array that represents a 2D dense array with either C (row) major ordering or Fortran (column) major ordering. The major ordering should de defined by A_is_row_major flag. |
| [in] | B_is_row_major_ | Boolean, can be 0 or 1 as follows:
|
| [in] | B_is_symmetric_ | Boolean. If B is symmetric, set this value to 1, otherwise 0. |
Definition at line 109 of file c_dense_affine_matrix_function.cpp.
References cDenseAffineMatrixFunction< DataType >::B, cAffineMatrixFunction< DataType >::B_is_identity, and cLinearOperatorBase::eigenvalue_relation_known.
|
virtual |
|
virtual |
Matrix vector product.
Performs the matrix vector product \( \boldsymbol{y} = (\mathbf{A} + t \mathbf{B}) \boldsymbol{x} \).
| [in] | vector | A one-dimensional input vector \( \boldsymbol{x} \) with size the of the number of columns of the matrix \( \mathbf{A} \). |
| [out] | product | A one-dimensional output vector \( \boldsymbol{y} \) with the size of the number of rows of \( \mathbf{A} \). This vector will be overwritten. |
Implements cLinearOperator< DataType >.
Definition at line 201 of file c_dense_affine_matrix_function.cpp.
|
virtual |
Specify whether the matrices are symmetic or non-symmetric.
This function overwrites the symmetry status that has been set by the constructor. Note that the symmetry status of both matrices \( \mathbf{A} \) and \( \mathbf{B} \) in the linear operator \( \mathbf{A} + t \mathbf{B} \) will be set together.
| [in] | symmetric | Boolean. If set to 1, the matrix is assumed to be symmetric. Otherwiese non-symmetric. |
Implements cAffineMatrixFunction< DataType >.
Definition at line 165 of file c_dense_affine_matrix_function.cpp.
References cLinearOperatorBase::set_symmetry().

|
virtual |
Matrix vector product written in place.
Performs the matrix vector product \( \boldsymbol{y} = (\mathbf{A} + t \mathbf{B})^{\intercal} \boldsymbol{x} \).
| [in] | vector | A one-dimensional input vector \( \boldsymbol{x} \) with size the of the number of columns of the matrix \( \mathbf{A} \). |
| [out] | product | A one-dimensional output vector \( \boldsymbol{y} \) with the size of the number of rows of \( \mathbf{A} \). |
Implements cLinearOperator< DataType >.
Definition at line 254 of file c_dense_affine_matrix_function.cpp.
|
protected |
Definition at line 82 of file c_dense_affine_matrix_function.h.
|
protected |
Definition at line 83 of file c_dense_affine_matrix_function.h.
Referenced by cDenseAffineMatrixFunction< DataType >::cDenseAffineMatrixFunction().