10 #ifndef DENSE_MATRIX_OPERATOR_H_ 11 #define DENSE_MATRIX_OPERATOR_H_ 20 template<
class T>
class SGVector;
21 template<
class T>
class SGMatrix;
29 template<
class T>
class CDenseMatrixOperator :
public CMatrixOperator<T>
32 typedef bool supports_complex128_t;
61 virtual SGVector<T>
apply(SGVector<T> b)
const;
83 template<
class Scalar>
86 REQUIRE(m_operator.matrix,
"Matrix is not initialized!\n");
89 for (
index_t i=0; i<m_operator.num_cols; ++i)
91 for (
index_t j=0; j<m_operator.num_rows; ++j)
92 casted_m(j,i)=
static_cast<Scalar
>(m_operator(j,i));
94 SG_SDEBUG(
"DenseMatrixOperator::static_cast(): Creating casted operator!\n");
102 return "DenseMatrixOperator";
116 #endif // HAVE_EIGEN3 117 #endif // DENSE_MATRIX_OPERATOR_H_
virtual void set_diagonal(SGVector< T > diag)
SGMatrix< T > get_matrix_operator() const
Class that represents a dense-matrix linear operator. It computes matrix-vector product in its apply...
virtual SGVector< T > apply(SGVector< T > b) const
virtual const char * get_name() const
all of classes and functions are contained in the shogun namespace
virtual SGVector< T > get_diagonal() const