DenseSymMatProd.h
Go to the documentation of this file.
1 // Copyright (C) 2016-2019 Yixuan Qiu <yixuan.qiu@cos.name>
2 //
3 // This Source Code Form is subject to the terms of the Mozilla
4 // Public License v. 2.0. If a copy of the MPL was not distributed
5 // with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
6 
7 #ifndef DENSE_SYM_MAT_PROD_H
8 #define DENSE_SYM_MAT_PROD_H
9 
10 #include <Eigen/Core>
11 
12 namespace Spectra {
13 
21 template <typename Scalar, int Uplo = Eigen::Lower>
23 {
24 private:
31 
33 
34 public:
44  m_mat(mat)
45  {}
46 
50  Index rows() const { return m_mat.rows(); }
54  Index cols() const { return m_mat.cols(); }
55 
62  // y_out = A * x_in
63  void perform_op(const Scalar* x_in, Scalar* y_out) const
64  {
65  MapConstVec x(x_in, m_mat.cols());
66  MapVec y(y_out, m_mat.rows());
67  y.noalias() = m_mat.template selfadjointView<Uplo>() * x;
68  }
69 };
70 
71 } // namespace Spectra
72 
73 #endif // DENSE_SYM_MAT_PROD_H
Spectra::DenseSymMatProd::ConstGenericMatrix
const typedef Eigen::Ref< const Matrix > ConstGenericMatrix
Definition: DenseSymMatProd.h:30
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
Spectra::DenseSymMatProd
Definition: DenseSymMatProd.h:22
mat
MatrixXf mat
Definition: Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
Spectra::DenseSymMatProd::Matrix
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: DenseSymMatProd.h:26
Spectra::DenseSymMatProd::MapConstVec
Eigen::Map< const Vector > MapConstVec
Definition: DenseSymMatProd.h:28
Spectra::DenseSymMatProd::MapVec
Eigen::Map< Vector > MapVec
Definition: DenseSymMatProd.h:29
Spectra::DenseSymMatProd::Index
Eigen::Index Index
Definition: DenseSymMatProd.h:25
Spectra::DenseSymMatProd::m_mat
ConstGenericMatrix m_mat
Definition: DenseSymMatProd.h:32
Eigen::Map
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:94
Spectra::DenseSymMatProd::perform_op
void perform_op(const Scalar *x_in, Scalar *y_out) const
Definition: DenseSymMatProd.h:63
y
Scalar * y
Definition: level1_cplx_impl.h:124
Spectra::DenseSymMatProd::cols
Index cols() const
Definition: DenseSymMatProd.h:54
Spectra::DenseSymMatProd::Vector
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Definition: DenseSymMatProd.h:27
Eigen::Ref
A matrix or vector expression mapping an existing expression.
Definition: Ref.h:281
Spectra::DenseSymMatProd::DenseSymMatProd
DenseSymMatProd(ConstGenericMatrix &mat)
Definition: DenseSymMatProd.h:43
Spectra::DenseSymMatProd::rows
Index rows() const
Definition: DenseSymMatProd.h:50
Spectra
Definition: LOBPCGSolver.h:19
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic >
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:27