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
internal
SymGEigsRegInvOp.h
Go to the documentation of this file.
1
// Copyright (C) 2017-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_SYM_GEIGS_REG_INV_OP_H
8
#define SPECTRA_SYM_GEIGS_REG_INV_OP_H
9
10
#include <Eigen/Core>
11
12
#include "../SparseSymMatProd.h"
13
#include "../SparseRegularInverse.h"
14
15
namespace
Spectra
{
16
23
template
<
typename
OpType = SparseSymMatProd<
double
>,
24
typename
BOpType = SparseRegularInverse<
double
>>
25
class
SymGEigsRegInvOp
26
{
27
public
:
28
using
Scalar
=
typename
OpType::Scalar
;
29
30
private
:
31
using
Index
=
Eigen::Index
;
32
using
Vector
=
Eigen::Matrix<Scalar, Eigen::Dynamic, 1>
;
33
34
const
OpType&
m_op
;
35
const
BOpType&
m_Bop
;
36
mutable
Vector
m_cache
;
// temporary working space
37
38
public
:
45
SymGEigsRegInvOp
(
const
OpType& op,
const
BOpType& Bop) :
46
m_op
(op),
m_Bop
(Bop),
m_cache
(op.
rows
())
47
{}
48
52
SymGEigsRegInvOp
(
SymGEigsRegInvOp
&&
other
) :
53
m_op
(
other
.
m_op
),
m_Bop
(
other
.
m_Bop
)
54
{
55
// We emulate the move constructor for Vector using Vector::swap()
56
m_cache
.
swap
(
other
.m_cache);
57
}
58
62
Index
rows
()
const
{
return
m_Bop
.rows(); }
66
Index
cols
()
const
{
return
m_Bop
.rows(); }
67
74
// y_out = inv(B) * A * x_in
75
void
perform_op
(
const
Scalar
* x_in,
Scalar
* y_out)
const
76
{
77
m_op
.perform_op(x_in,
m_cache
.
data
());
78
m_Bop
.solve(
m_cache
.
data
(), y_out);
79
}
80
};
81
82
}
// namespace Spectra
83
84
#endif // SPECTRA_SYM_GEIGS_REG_INV_OP_H
Eigen::PlainObjectBase::swap
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(DenseBase< OtherDerived > &other)
Definition:
PlainObjectBase.h:953
Spectra::SymGEigsRegInvOp::SymGEigsRegInvOp
SymGEigsRegInvOp(SymGEigsRegInvOp &&other)
Definition:
SymGEigsRegInvOp.h:52
Spectra::SymGEigsRegInvOp::Index
Eigen::Index Index
Definition:
SymGEigsRegInvOp.h:31
Spectra::SymGEigsRegInvOp::m_Bop
const BOpType & m_Bop
Definition:
SymGEigsRegInvOp.h:35
Spectra::SymGEigsRegInvOp::cols
Index cols() const
Definition:
SymGEigsRegInvOp.h:66
Spectra::SymGEigsRegInvOp::m_cache
Vector m_cache
Definition:
SymGEigsRegInvOp.h:36
Spectra::SymGEigsRegInvOp::rows
Index rows() const
Definition:
SymGEigsRegInvOp.h:62
Spectra::SymGEigsRegInvOp::m_op
const OpType & m_op
Definition:
SymGEigsRegInvOp.h:34
Spectra::SymGEigsRegInvOp
Definition:
SymGEigsRegInvOp.h:25
Spectra::SymGEigsRegInvOp::perform_op
void perform_op(const Scalar *x_in, Scalar *y_out) const
Definition:
SymGEigsRegInvOp.h:75
Spectra
Definition:
LOBPCGSolver.h:19
Eigen::PlainObjectBase::data
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
Definition:
PlainObjectBase.h:247
Spectra::SymGEigsRegInvOp::Scalar
typename OpType::Scalar Scalar
Definition:
SymGEigsRegInvOp.h:28
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 >
Spectra::SymGEigsRegInvOp::SymGEigsRegInvOp
SymGEigsRegInvOp(const OpType &op, const BOpType &Bop)
Definition:
SymGEigsRegInvOp.h:45
pybind_wrapper_test_script.other
other
Definition:
pybind_wrapper_test_script.py:42
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 Thu Apr 10 2025 03:04:25