10 #ifndef DENSE_MATRIX_OPERATOR_H_
11 #define DENSE_MATRIX_OPERATOR_H_
19 template<
class T>
class SGVector;
20 template<
class T>
class SGMatrix;
28 template<
class T>
class CDenseMatrixOperator :
public CMatrixOperator<T>
31 typedef bool supports_complex128_t;
60 virtual SGVector<T>
apply(SGVector<T> b)
const;
82 template<
class Scalar>
85 REQUIRE(m_operator.matrix,
"Matrix is not initialized!\n");
88 for (
index_t i=0; i<m_operator.num_cols; ++i)
90 for (
index_t j=0; j<m_operator.num_rows; ++j)
91 casted_m(j,i)=
static_cast<Scalar
>(m_operator(j,i));
100 return "DenseMatrixOperator";
114 #endif // DENSE_MATRIX_OPERATOR_H_
SGMatrix< T > get_matrix_operator() const
virtual SGVector< T > apply(SGVector< T > b) const
virtual void set_diagonal(SGVector< T > diag)
virtual SGVector< T > get_diagonal() const
Class that represents a dense-matrix linear operator. It computes matrix-vector product in its apply...
all of classes and functions are contained in the shogun namespace
virtual const char * get_name() const