10#ifndef EIGEN_SELFADJOINTMATRIX_H
11#define EIGEN_SELFADJOINTMATRIX_H
32template<
typename MatrixType,
unsigned int UpLo>
37 typedef MatrixType ExpressionType;
38 typedef typename MatrixType::PlainObject FullMatrixType;
42 Flags = MatrixTypeNestedCleaned::Flags & (HereditaryBits|FlagsLvalueBit)
54 typedef _MatrixType MatrixType;
61 typedef typename MatrixType::StorageIndex StorageIndex;
67 typedef typename MatrixType::PlainObject PlainObject;
74 inline Index rows()
const {
return m_matrix.rows(); }
76 inline Index cols()
const {
return m_matrix.cols(); }
78 inline Index outerStride()
const {
return m_matrix.outerStride(); }
80 inline Index innerStride()
const {
return m_matrix.innerStride(); }
88 Base::check_coordinates_internal(row, col);
89 return m_matrix.coeff(row, col);
99 Base::check_coordinates_internal(row, col);
100 return m_matrix.const_cast_derived().coeffRef(row, col);
105 const MatrixTypeNestedCleaned& _expression()
const {
return m_matrix; }
108 const MatrixTypeNestedCleaned& nestedExpression()
const {
return m_matrix; }
110 MatrixTypeNestedCleaned& nestedExpression() {
return *
const_cast<MatrixTypeNestedCleaned*
>(&m_matrix); }
113 template<
typename OtherDerived>
115 const Product<SelfAdjointView,OtherDerived>
122 template<
typename OtherDerived>
friend
147 template<
typename DerivedU,
typename DerivedV>
161 template<
typename DerivedU>
183 MatrixTypeNested m_matrix;
201template<
typename MatrixType,
unsigned int Mode>
207 static const int AssumeAliasing = 0;
210template<
int UpLo,
int SetOpposite,
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT,
typename Functor,
int Version>
216 typedef typename Base::DstXprType DstXprType;
217 typedef typename Base::SrcXprType SrcXprType;
220 using Base::m_functor;
225 typedef typename Base::Scalar Scalar;
235 eigen_internal_assert(row!=col);
236 Scalar tmp = m_src.coeff(row,col);
237 m_functor.assignCoeff(m_dst.coeffRef(row,col), tmp);
238 m_functor.assignCoeff(m_dst.coeffRef(col,row), numext::conj(tmp));
247 { eigen_internal_assert(
false &&
"should never be called"); }
256template<
typename Derived>
257template<
unsigned int UpLo>
261 return typename ConstSelfAdjointViewReturnType<UpLo>::Type(derived());
264template<
typename Derived>
265template<
unsigned int UpLo>
266typename MatrixBase<Derived>::template SelfAdjointViewReturnType<UpLo>::Type
267MatrixBase<Derived>::selfadjointView()
269 return typename SelfAdjointViewReturnType<UpLo>::Type(derived());
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition SelfAdjointView.h:51
friend EIGEN_DEVICE_FUNC const Product< OtherDerived, SelfAdjointView > operator*(const MatrixBase< OtherDerived > &lhs, const SelfAdjointView &rhs)
Efficient vector/matrix times triangular matrix product.
Definition SelfAdjointView.h:125
EIGEN_DEVICE_FUNC RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition MatrixBaseEigenvalues.h:153
EIGEN_DEVICE_FUNC SelfAdjointView & rankUpdate(const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha=Scalar(1))
Perform a symmetric rank 2 update of the selfadjoint matrix *this: .
EIGEN_DEVICE_FUNC SelfAdjointView & rankUpdate(const MatrixBase< DerivedU > &u, const Scalar &alpha=Scalar(1))
Perform a symmetric rank K update of the selfadjoint matrix *this: where u is a vector or matrix.
const LLT< PlainObject, UpLo > llt() const
\cholesky_module
Definition LLT.h:484
EIGEN_DEVICE_FUNC const Product< SelfAdjointView, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
Efficient triangular matrix times vector/matrix product.
Definition SelfAdjointView.h:116
const LDLT< PlainObject, UpLo > ldlt() const
\cholesky_module
Definition LDLT.h:582
Matrix< RealScalar, internal::traits< MatrixType >::ColsAtCompileTime, 1 > EigenvaluesReturnType
Return type of eigenvalues()
Definition SelfAdjointView.h:175
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index row, Index col)
Definition SelfAdjointView.h:96
EIGEN_DEVICE_FUNC Scalar coeff(Index row, Index col) const
Definition SelfAdjointView.h:86
EIGEN_DEVICE_FUNC EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition MatrixBaseEigenvalues.h:89
internal::traits< SelfAdjointView >::Scalar Scalar
The type of coefficients in this matrix.
Definition SelfAdjointView.h:60
NumTraits< Scalar >::Real RealScalar
Real part of Scalar.
Definition SelfAdjointView.h:173
Pseudo expression representing a solving operation.
Definition Solve.h:63
Base class for triangular part in a matrix.
Definition TriangularMatrix.h:28
Definition AssignEvaluator.h:539
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(Index row, Index col)
Assign src(row,col) to dst(row,col) through the assignment functor.
Definition AssignEvaluator.h:571
Definition TriangularMatrix.h:745
@ SelfAdjoint
Used in BandMatrix and SelfAdjointView to indicate that the matrix is self-adjoint.
Definition Constants.h:220
const unsigned int PacketAccessBit
Short version: means the expression might be vectorized.
Definition Constants.h:88
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition Constants.h:124
const unsigned int DirectAccessBit
Means that the underlying array of coefficients can be directly accessed as a plain strided array.
Definition Constants.h:149
const unsigned int LvalueBit
Means the expression has a coeffRef() method, i.e.
Definition Constants.h:138
Eigen::Index Index
The interface type of indices.
Definition EigenBase.h:37
Definition Constants.h:517
Definition Constants.h:525
Definition CoreEvaluators.h:75
Definition XprHelper.h:628
Definition ForwardDeclarations.h:17