Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Classes
Class List
Class Hierarchy
Class Members
All
!
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
!
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
f
k
l
m
n
o
p
r
s
t
v
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
u
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
Enumerator
b
c
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
gtsam
3rdparty
Spectra
MatOp
DenseHermMatProd.h
Go to the documentation of this file.
1
// Copyright (C) 2024-2025 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 SPECTRA_DENSE_HERM_MAT_PROD_H
8
#define SPECTRA_DENSE_HERM_MAT_PROD_H
9
10
#include <Eigen/Core>
11
12
namespace
Spectra
{
13
29
template
<
typename
Scalar_,
int
Uplo = Eigen::Lower,
int
Flags = Eigen::ColMajor>
30
class
DenseHermMatProd
31
{
32
public
:
36
using
Scalar
= Scalar_;
37
38
private
:
39
using
Index
=
Eigen::Index
;
40
using
Matrix
=
Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Flags>
;
41
using
Vector
=
Eigen::Matrix<Scalar, Eigen::Dynamic, 1>
;
42
using
MapConstVec
=
Eigen::Map<const Vector>
;
43
using
MapVec
=
Eigen::Map<Vector>
;
44
using
ConstGenericMatrix
=
const
Eigen::Ref<const Matrix>
;
45
46
ConstGenericMatrix
m_mat
;
47
48
public
:
57
template
<
typename
Derived>
58
DenseHermMatProd
(
const
Eigen::MatrixBase<Derived>
&
mat
) :
59
m_mat
(
mat
)
60
{
61
static_assert(
62
static_cast<
int
>
(Derived::PlainObject::IsRowMajor) ==
static_cast<
int
>
(Matrix::IsRowMajor),
63
"DenseHermMatProd: the \"Flags\" template parameter does not match the input matrix (Eigen::ColMajor/Eigen::RowMajor)"
);
64
}
65
69
Index
rows
()
const
{
return
m_mat
.rows(); }
73
Index
cols
()
const
{
return
m_mat
.cols(); }
74
81
// y_out = A * x_in
82
void
perform_op
(
const
Scalar
* x_in,
Scalar
* y_out)
const
83
{
84
MapConstVec
x
(x_in,
m_mat
.cols());
85
MapVec
y
(y_out,
m_mat
.rows());
86
y
.noalias() =
m_mat
.template selfadjointView<Uplo>() *
x
;
87
}
88
};
89
90
}
// namespace Spectra
91
92
#endif // SPECTRA_DENSE_HERM_MAT_PROD_H
Spectra::DenseHermMatProd::cols
Index cols() const
Definition:
DenseHermMatProd.h:73
Spectra::DenseHermMatProd< double >::Index
Eigen::Index Index
Definition:
DenseHermMatProd.h:39
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::DenseHermMatProd::m_mat
ConstGenericMatrix m_mat
Definition:
DenseHermMatProd.h:46
Spectra::DenseHermMatProd::rows
Index rows() const
Definition:
DenseHermMatProd.h:69
mat
MatrixXf mat
Definition:
Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
Spectra::DenseHermMatProd< double >::Scalar
double Scalar
Definition:
DenseHermMatProd.h:36
Spectra::DenseHermMatProd::perform_op
void perform_op(const Scalar *x_in, Scalar *y_out) const
Definition:
DenseHermMatProd.h:82
Spectra::DenseHermMatProd
Definition:
DenseHermMatProd.h:30
Eigen::Map
A matrix or vector expression mapping an existing array of data.
Definition:
Map.h:94
y
Scalar * y
Definition:
level1_cplx_impl.h:124
Eigen::Ref< const Matrix >
Spectra
Definition:
LOBPCGSolver.h:19
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition:
3rdparty/Eigen/Eigen/src/Core/Matrix.h:178
Spectra::DenseHermMatProd::DenseHermMatProd
DenseHermMatProd(const Eigen::MatrixBase< Derived > &mat)
Definition:
DenseHermMatProd.h:58
Eigen::MatrixBase
Base class for all dense matrices, vectors, and expressions.
Definition:
MatrixBase.h:48
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 Thu Apr 10 2025 03:01:21