44 using Index = Eigen::Index;
45 using Matrix = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Flags>;
46 using Vector = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;
47 using MapConstVec = Eigen::Map<const Vector>;
48 using MapVec = Eigen::Map<Vector>;
49 using ConstGenericMatrix =
const Eigen::Ref<const Matrix>;
51 ConstGenericMatrix m_mat;
62 template <
typename Derived>
67 static_cast<int>(Derived::PlainObject::IsRowMajor) ==
static_cast<int>(Matrix::IsRowMajor),
68 "DenseGenMatProd: the \"Flags\" template parameter does not match the input matrix (Eigen::ColMajor/Eigen::RowMajor)");
74 Index
rows()
const {
return m_mat.rows(); }
78 Index
cols()
const {
return m_mat.cols(); }
89 MapConstVec x(x_in, m_mat.cols());
90 MapVec y(y_out, m_mat.rows());
91 y.noalias() = m_mat * x;
97 Matrix
operator*(
const Eigen::Ref<const Matrix>& mat_in)
const
99 return m_mat * mat_in;
97 Matrix
operator*(
const Eigen::Ref<const Matrix>& mat_in)
const {
…}