28 template <
typename DataType>
30 const DataType* A_data_,
40 A(A_data_, A_indices_, A_index_pointer_, num_rows_, num_columns_)
54 template <
typename DataType>
56 const DataType* A_data_,
61 const DataType* B_data_,
69 A(A_data_, A_indices_, A_index_pointer_, num_rows_, num_columns_),
70 B(B_data_, B_indices_, B_index_pointer_, num_rows_, num_columns_)
73 if (this->
B.is_identity_matrix())
85 template <
typename DataType>
111 template <
typename DataType>
113 const DataType* vector,
117 this->A.dot(vector, product);
121 if (this->B_is_identity)
124 assert((this->parameters != NULL) &&
"Parameter is not set.");
128 (this->num_rows < this->num_columns) ? \
129 this->num_rows : this->num_columns;
132 this->_add_scaled_vector(vector, min_vector_size,
133 this->parameters[0], product);
138 assert((this->parameters != NULL) &&
"Parameter is not set.");
141 this->B.dot_plus(vector, this->parameters[0], product);
167 template <
typename DataType>
169 const DataType* vector,
173 this->A.transpose_dot(vector, product);
177 if (this->B_is_identity)
180 assert((this->parameters != NULL) &&
"Parameter is not set.");
184 (this->num_rows < this->num_columns) ? \
185 this->num_rows : this->num_columns;
188 this->_add_scaled_vector(vector, min_vector_size,
189 this->parameters[0], product);
194 assert((this->parameters != NULL) &&
"Parameter is not set.");
197 this->B.transpose_dot_plus(vector, this->parameters[0], product);
Base class for affine matrix functions of one parameter.
virtual ~cCSRAffineMatrixFunction()
virtual void dot(const DataType *vector, DataType *product)
Computes the matrix vector product:
virtual void transpose_dot(const DataType *vector, DataType *product)
Computes the matrix vector product:
cCSRAffineMatrixFunction(const DataType *A_data_, const LongIndexType *A_indices_, const LongIndexType *A_index_pointer_, const LongIndexType num_rows_, const LongIndexType num_columns_)
Constructor. Matrix B is assumed to be the identity matrix.
FlagType eigenvalue_relation_known