imate
C++/CUDA Reference
|
Base class for affine matrix functions of one parameter. More...
#include <c_affine_matrix_function.h>
Public Member Functions | |
cAffineMatrixFunction (const LongIndexType num_rows_, const LongIndexType num_columns_) | |
Constructor. More... | |
virtual | ~cAffineMatrixFunction () |
Virtual destructor. More... | |
void | set_parameters (DataType *t) |
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. More... | |
Public Member Functions inherited from cLinearOperator< DataType > | |
cLinearOperator () | |
Default constructor. More... | |
cLinearOperator (const LongIndexType num_rows_, const LongIndexType num_columns_) | |
Constructor with setting num_rows and num_columns . More... | |
virtual | ~cLinearOperator () |
LongIndexType | get_num_rows () const |
LongIndexType | get_num_columns () const |
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. More... | |
IndexType | get_num_parameters () const |
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. More... | |
virtual void | dot (const DataType *vector, DataType *product)=0 |
virtual void | transpose_dot (const DataType *vector, DataType *product)=0 |
Protected Member Functions | |
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. More... | |
Protected Attributes | |
bool | B_is_identity |
Protected Attributes inherited from cLinearOperator< DataType > | |
const LongIndexType | num_rows |
const LongIndexType | num_columns |
FlagType | eigenvalue_relation_known |
DataType * | parameters |
IndexType | num_parameters |
Base class for affine matrix functions of one parameter.
The prefix c
in this class's name (and its derivatves), stands for the cpp
code, intrast to the cu
prefix, which stands for the cuda code. Most derived classes have a cuda counterpart.
Definition at line 40 of file c_affine_matrix_function.h.
cAffineMatrixFunction< DataType >::cAffineMatrixFunction | ( | const LongIndexType | num_rows_, |
const LongIndexType | num_columns_ | ||
) |
Constructor.
Definition at line 29 of file c_affine_matrix_function.cpp.
References cLinearOperator< DataType >::num_parameters.
|
virtual |
|
protected |
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.
[in] | input_vector | The input 1D vector of size vector_size . |
[in] | vector_size | The size of both input_vector and output_vector |
[in] | scale | The scalar scale at whch the input vector is multiplied by. |
[in,out] | output_vector | The output 1D vector of size vector_size . This array will be written in-place. |
Definition at line 136 of file c_affine_matrix_function.cpp.
References cVectorOperations< DataType >::subtract_scaled_vector().
|
virtual |
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.
A relation between eigenvalue(s) and the set of parameters can be made when the matrix :math:\\mathbf{B}
is equal to the identity matrix \( \mathbf{I} \), and corresponding linear operator is as follows:
\[ \mathbf{A}(t) = \mathbf{A} + t \mathbf{I} \]
Then, the eigenvalues \( \lambda \) of the operator is
\[ \lambda(\mathbf{A}(t)) = \lambda(\mathbf{A}) + t. \]
Thus, by knowing the eigenvalue \( \lambda_{t_0} \) at the known parameter \( t_0 \), the eigenvalue \( \lambda_{t} \) at the inquiry parameter \( t \) can be obtained.
[in] | known_parameters | A set of parameters of the operator where the corresponding eigenvalue of the parameter is known for. |
[in] | known_eigenvalue | The known eigenvalue of the operator for the known parameters. |
[in] | inquiry_parameters | A set of inquiry parameters of the operator where the corresponding eigenvalue of the operator is sought. |
Implements cLinearOperator< DataType >.
Definition at line 98 of file c_affine_matrix_function.cpp.
void cAffineMatrixFunction< DataType >::set_parameters | ( | DataType * | t | ) |
|
protected |