10 #ifndef EIGEN_SELFADJOINTMATRIX_H 11 #define EIGEN_SELFADJOINTMATRIX_H 32 template<
typename MatrixType,
unsigned int UpLo>
79 inline Index rows()
const {
return m_matrix.rows(); }
81 inline Index cols()
const {
return m_matrix.cols(); }
93 Base::check_coordinates_internal(row, col);
94 return m_matrix.coeff(row, col);
104 Base::check_coordinates_internal(row, col);
105 return m_matrix.coeffRef(row, col);
110 const MatrixTypeNestedCleaned&
_expression()
const {
return m_matrix; }
118 template<
typename OtherDerived>
127 template<
typename OtherDerived>
friend 135 friend EIGEN_DEVICE_FUNC
152 template<
typename DerivedU,
typename DerivedV>
166 template<
typename DerivedU>
180 template<
unsigned int TriMode>
203 inline const AdjointReturnType
adjoint()
const 204 {
return AdjointReturnType(m_matrix.adjoint()); }
212 typename MatrixType::TransposeReturnType tmp(m_matrix);
213 return TransposeReturnType(tmp);
221 return ConstTransposeReturnType(m_matrix.transpose());
230 typename MatrixType::ConstDiagonalReturnType
diagonal()
const 232 return typename MatrixType::ConstDiagonalReturnType(m_matrix);
248 EigenvaluesReturnType eigenvalues()
const;
250 RealScalar operatorNorm()
const;
271 template<
typename MatrixType,
unsigned int Mode>
278 template<
int UpLo,
int SetOpposite,
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT,
typename Functor,
int Version>
288 using Base::m_functor;
298 : Base(dst, src, func, dstExpr)
304 Scalar tmp = m_src.coeff(row,col);
305 m_functor.assignCoeff(m_dst.coeffRef(row,col), tmp);
306 m_functor.assignCoeff(m_dst.coeffRef(col,row),
numext::conj(tmp));
311 Base::assignCoeff(
id,
id);
325 template<
typename Derived>
326 template<
unsigned int UpLo>
342 template<
typename Derived>
343 template<
unsigned int UpLo>
352 #endif // EIGEN_SELFADJOINTMATRIX_H Robust Cholesky decomposition of a matrix with pivoting.
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Matrix< RealScalar, internal::traits< MatrixType >::ColsAtCompileTime, 1 > EigenvaluesReturnType
friend EIGEN_DEVICE_FUNC const SelfAdjointView< const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar, MatrixType, product), UpLo > operator*(const Scalar &s, const SelfAdjointView &mat)
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
SrcEvaluatorTypeT::XprType SrcXprType
Expression of the product of two arbitrary matrices or vectors.
EIGEN_DEVICE_FUNC Index outerStride() const
generic_dense_assignment_kernel< DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version > Base
EIGEN_DEVICE_FUNC const ConjugateReturnType conjugate() const
MatrixType::StorageIndex StorageIndex
Base class for triangular part in a matrix.
const unsigned int DirectAccessBit
EIGEN_DEVICE_FUNC MatrixType::ConstDiagonalReturnType diagonal() const
EIGEN_DEVICE_FUNC ColXpr col(Index i)
This is the const version of col().
const unsigned int LvalueBit
SelfAdjointView< const typename MatrixType::AdjointReturnType, TransposeMode > AdjointReturnType
DstEvaluatorType::Scalar Scalar
EIGEN_DEVICE_FUNC void assignCoeff(Index row, Index col)
internal::remove_all< typename MatrixType::ConjugateReturnType >::type MatrixConjugateReturnType
Base::DstEvaluatorType DstEvaluatorType
MatrixType::PlainObject PlainObject
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType &dstExpr)
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC TransposeReturnType transpose()
storage_kind_to_evaluator_kind< typename MatrixType::StorageKind >::Kind Kind
EIGEN_DEVICE_FUNC const AdjointReturnType adjoint() const
Eigen::Index Index
The interface type of indices.
EIGEN_DEVICE_FUNC SelfAdjointViewReturnType< UpLo >::Type selfadjointView()
const unsigned int PacketAccessBit
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleaned & _expression() const
Base::SrcEvaluatorType SrcEvaluatorType
#define EIGEN_STATIC_ASSERT_LVALUE(Derived)
internal::traits< SelfAdjointView >::Scalar Scalar
The type of coefficients in this matrix.
internal::traits< SelfAdjointView >::MatrixTypeNestedCleaned MatrixTypeNestedCleaned
EIGEN_DEVICE_FUNC MatrixTypeNestedCleaned & nestedExpression()
internal::traits< SelfAdjointView >::MatrixTypeNested MatrixTypeNested
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleaned & nestedExpression() const
SrcEvaluatorTypeT SrcEvaluatorType
TriangularBase< SelfAdjointView > Base
const unsigned int HereditaryBits
EIGEN_DEVICE_FUNC Index rows() const
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
SelfAdjointView< typename MatrixType::TransposeReturnType, TransposeMode > TransposeReturnType
DstEvaluatorTypeT DstEvaluatorType
ref_selector< MatrixType >::non_const_type MatrixTypeNested
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
EIGEN_DEVICE_FUNC void assignOppositeCoeff(Index, Index)
EIGEN_DEVICE_FUNC Index innerStride() const
EIGEN_DEVICE_FUNC SelfAdjointView(MatrixType &matrix)
Base::DstXprType DstXprType
EIGEN_DEVICE_FUNC Index cols() const
EIGEN_DEVICE_FUNC void assignDiagonalCoeff(Index id)
DstEvaluatorTypeT::XprType DstXprType
MatrixTypeNested m_matrix
SelfAdjointView< const MatrixConjugateReturnType, UpLo > ConjugateReturnType
Base::AssignmentTraits AssignmentTraits
MatrixType ExpressionType
Expression of a triangular part in a matrix.
SelfAdjointView< const typename MatrixType::ConstTransposeReturnType, TransposeMode > ConstTransposeReturnType
EIGEN_DEVICE_FUNC RowXpr row(Index i)
This is the const version of row(). */.
MatrixType::PlainObject FullMatrixType
remove_all< MatrixTypeNested >::type MatrixTypeNestedCleaned
internal::conditional< NumTraits< Scalar >::IsComplex, const CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, const Derived >, const Derived &>::type ConjugateReturnType
#define eigen_internal_assert(x)
EIGEN_DEVICE_FUNC const ConstTransposeReturnType transpose() const
The matrix class, also used for vectors and row-vectors.
EIGEN_DEVICE_FUNC internal::conditional<(TriMode &(Upper|Lower))==(UpLo &(Upper|Lower)), TriangularView< MatrixType, TriMode >, TriangularView< typename MatrixType::AdjointReturnType, TriMode > >::type triangularView() const
Base::SrcXprType SrcXprType
EIGEN_DEVICE_FUNC const Product< SelfAdjointView, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
Base class for all dense matrices, vectors, and expressions.
const unsigned int LinearAccessBit
friend EIGEN_DEVICE_FUNC const Product< OtherDerived, SelfAdjointView > operator*(const MatrixBase< OtherDerived > &lhs, const SelfAdjointView &rhs)
MatrixTypeNestedCleaned NestedExpression
EIGEN_DEVICE_FUNC Scalar coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index row, Index col)