Go to the documentation of this file.
16 template<
typename MatrixType,
int UpLo>
struct LLT_Traits;
56 template<
typename _MatrixType,
int _UpLo>
class LLT
95 template<
typename InputType>
110 template<
typename InputType>
119 inline typename Traits::MatrixU
matrixU()
const
126 inline typename Traits::MatrixL
matrixL()
const
142 template<
typename Rhs>
148 &&
"LLT::solve(): invalid number of rows of the right hand side matrix b");
152 template<
typename Derived>
155 template<
typename InputType>
202 template<
typename VectorType>
205 #ifndef EIGEN_PARSED_BY_DOXYGEN
206 template<
typename RhsType,
typename DstType>
208 void _solve_impl(
const RhsType &rhs, DstType &dst)
const;
232 template<
typename MatrixType,
typename VectorType>
254 temp =
sqrt(sigma) * vec;
264 ColXprSegment
x(
mat.col(i).tail(rs));
265 TempVecSegment
y(temp.tail(rs));
278 Scalar wj = temp.coeff(j);
286 mat.coeffRef(j,j) = nLjj;
293 temp.tail(rs) -= (wj/Ljj) *
mat.col(j).tail(rs);
295 mat.col(j).tail(rs) = (nLjj/Ljj) *
mat.col(j).tail(rs) + (nLjj * sigma*
numext::conj(wj)/gamma)*temp.tail(rs);
305 template<
typename MatrixType>
321 if (k>0)
x -= A10.squaredNorm();
325 if (k>0 && rs>0) A21.noalias() -= A20 * A10.adjoint();
331 template<
typename MatrixType>
340 blockSize = (blockSize/16)*16;
356 if((
ret=unblocked(A11))>=0)
return k+
ret;
357 if(rs>0) A11.adjoint().template triangularView<Upper>().template solveInPlace<OnTheRight>(A21);
363 template<
typename MatrixType,
typename VectorType>
374 template<
typename MatrixType>
380 template<
typename MatrixType>
386 template<
typename MatrixType,
typename VectorType>
423 template<
typename MatrixType,
int _UpLo>
424 template<
typename InputType>
427 check_template_parameters();
433 m_matrix =
a.derived();
441 abs_col_sum = m_matrix.col(
col).tail(
size -
col).template lpNorm<1>() + m_matrix.row(
col).head(
col).template lpNorm<1>();
443 abs_col_sum = m_matrix.col(
col).head(
col).template lpNorm<1>() + m_matrix.row(
col).tail(
size -
col).template lpNorm<1>();
444 if (abs_col_sum > m_l1_norm)
445 m_l1_norm = abs_col_sum;
448 m_isInitialized =
true;
449 bool ok = Traits::inplace_decomposition(m_matrix);
460 template<
typename _MatrixType,
int _UpLo>
461 template<
typename VectorType>
475 #ifndef EIGEN_PARSED_BY_DOXYGEN
476 template<
typename _MatrixType,
int _UpLo>
477 template<
typename RhsType,
typename DstType>
498 template<
typename MatrixType,
int _UpLo>
499 template<
typename Derived>
502 eigen_assert(m_isInitialized &&
"LLT is not initialized.");
504 matrixL().solveInPlace(bAndX);
505 matrixU().solveInPlace(bAndX);
511 template<
typename MatrixType,
int _UpLo>
514 eigen_assert(m_isInitialized &&
"LLT is not initialized.");
515 return matrixL() * matrixL().adjoint().toDenseMatrix();
522 template<
typename Derived>
533 template<
typename MatrixType,
unsigned int UpLo>
542 #endif // EIGEN_LLT_H
static bool inplace_decomposition(MatrixType &m)
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
const EIGEN_DEVICE_FUNC SqrtReturnType sqrt() const
const LLT & adjoint() const
static MatrixL getL(const MatrixType &m)
NumTraits< typename MatrixType::Scalar >::Real RealScalar
Expression of a fixed-size or dynamic-size block.
Map< Matrix< Scalar, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > MatrixType
bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< has_direct_access< T1 >::ret &&has_direct_access< T2 >::ret, T1 >::type *=0)
internal::LLT_Traits< MatrixType, UpLo > Traits
const LLT< PlainObject > llt() const
void solveInPlace(const MatrixBase< Derived > &bAndX) const
VectorBlock< Derived > SegmentReturnType
NumTraits< Scalar >::Real RealScalar
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC ColXpr col(Index i)
This is the const version of col().
static Index unblocked(MatrixType &mat)
const LLT< PlainObject, UpLo > llt() const
NumTraits< Scalar >::Real RealScalar
const typedef TriangularView< const MatrixType, Upper > MatrixU
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Abs2ReturnType abs2() const
const typedef TriangularView< const typename MatrixType::AdjointReturnType, Upper > MatrixU
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Rotation given by a cosine-sine pair.
Decomposition::RealScalar rcond_estimate_helper(typename Decomposition::RealScalar matrix_norm, const Decomposition &dec)
Reciprocal condition number estimator.
static bool inplace_decomposition(MatrixType &m)
void makeGivens(const Scalar &p, const Scalar &q, Scalar *r=0)
LLT rankUpdate(const VectorType &vec, const RealScalar &sigma=1)
Expression of the transpose of a matrix.
static Index blocked(MatrixType &m)
LLT & compute(const EigenBase< InputType > &matrix)
Traits::MatrixL matrixL() const
static MatrixL getL(const MatrixType &m)
const typedef TriangularView< const typename MatrixType::AdjointReturnType, Lower > MatrixL
MatrixType::Scalar Scalar
#define EIGEN_STRONG_INLINE
static Index rankUpdate(MatrixType &mat, const VectorType &vec, const RealScalar &sigma)
static MatrixU getU(const MatrixType &m)
MatrixType reconstructedMatrix() const
const typedef TriangularView< const MatrixType, Lower > MatrixL
static void check_template_parameters()
static MatrixU getU(const MatrixType &m)
Block< Derived, internal::traits< Derived >::RowsAtCompileTime, 1, !IsRowMajor > ColXpr
static Index llt_rank_update_lower(MatrixType &mat, const VectorType &vec, const typename MatrixType::RealScalar &sigma)
static Index rankUpdate(MatrixType &mat, const VectorType &vec, const RealScalar &sigma)
static EIGEN_STRONG_INLINE Index blocked(MatrixType &mat)
MatrixType::StorageIndex StorageIndex
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
static EIGEN_STRONG_INLINE Index unblocked(MatrixType &mat)
Pseudo expression representing a solving operation.
ComputationInfo info() const
Reports whether previous computation was successful.
EIGEN_DEVICE_FUNC void _solve_impl(const RhsType &rhs, DstType &dst) const
LLT(Index size)
Default Constructor with memory preallocation.
LLT(EigenBase< InputType > &matrix)
Constructs a LDLT factorization from a given matrix.
LLT(const EigenBase< InputType > &matrix)
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
void apply_rotation_in_the_plane(DenseBase< VectorX > &xpr_x, DenseBase< VectorY > &xpr_y, const JacobiRotation< OtherScalar > &j)
Traits::MatrixU matrixU() const
Base class for all dense matrices, vectors, and expressions.
const Solve< LLT, Rhs > solve(const MatrixBase< Rhs > &b) const
const MatrixType & matrixLLT() const
bool ok()
global method to check whether to proceed or cancel the current action
Expression of a triangular part in a matrix.
LLT()
Default Constructor.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE)
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:05:53