Go to the documentation of this file.
11 #ifndef TRIDIAG_EIGEN_H
12 #define TRIDIAG_EIGEN_H
15 #include <Eigen/Jacobi>
18 #include "../Util/TypeTraits.h"
22 template <
typename Scalar =
double>
88 diag[k + 1] =
s * sdk +
c * dkp1;
89 subdiag[k] =
c * sdk -
s * dkp1;
92 subdiag[k - 1] =
c * subdiag[k - 1] -
s *
z;
98 z = -
s * subdiag[k + 1];
99 subdiag[k + 1] =
c * subdiag[k + 1];
104 q.applyOnTheRight(k, k + 1,
rot);
127 throw std::invalid_argument(
"TridiagEigen: matrix must be square");
136 mat.diagonal(-1).cwiseAbs().maxCoeff());
164 if (
abs(subdiag[
i]) <= considerAsZero ||
184 while (start > 0 && subdiag[start - 1] !=
Scalar(0))
191 throw std::runtime_error(
"TridiagEigen: eigen decomposition failed");
202 throw std::logic_error(
"TridiagEigen: need to call compute() first");
211 throw std::logic_error(
"TridiagEigen: need to call compute() first");
219 #endif // TRIDIAG_EIGEN_H
Eigen::Ref< Matrix > GenericMatrix
const typedef Eigen::Ref< const Matrix > ConstGenericMatrix
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void compute(ConstGenericMatrix &mat)
Matrix diag(const std::vector< Matrix > &Hs)
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
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Rotation given by a cosine-sine pair.
int EIGEN_BLAS_FUNC() rot(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps)
const Vector & eigenvalues() const
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 y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics scale
EIGEN_DEVICE_FUNC const Scalar & q
A matrix or vector expression mapping an existing array of data.
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
const Matrix & eigenvectors() const
EIGEN_DEVICE_FUNC bool abs2(bool x)
A matrix or vector expression mapping an existing expression.
iterator iter(handle obj)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
TridiagEigen(ConstGenericMatrix &mat)
static const EIGEN_DEPRECATED end_t end
static void tridiagonal_qr_step(RealScalar *diag, RealScalar *subdiag, Index start, Index end, Scalar *matrixQ, Index n)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:33