10 #ifndef EIGEN_SELFADJOINTMATRIX_H
11 #define EIGEN_SELFADJOINTMATRIX_H
34 template<
typename MatrixType,
unsigned int UpLo>
35 struct traits<SelfAdjointView<
MatrixType, UpLo> > : traits<MatrixType>
37 typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;
38 typedef remove_all_t<MatrixTypeNested> MatrixTypeNestedCleaned;
43 FlagsLvalueBit = is_lvalue<MatrixType>::value ?
LvalueBit : 0,
44 Flags = MatrixTypeNestedCleaned::Flags & (
HereditaryBits|FlagsLvalueBit)
70 Mode = internal::traits<SelfAdjointView>::Mode,
71 Flags = internal::traits<SelfAdjointView>::Flags,
119 template<
typename OtherDerived>
128 template<
typename OtherDerived>
friend
140 return (s*
mat.nestedExpression()).template selfadjointView<UpLo>();
153 template<
typename DerivedU,
typename DerivedV>
167 template<
typename DerivedU>
181 template<
unsigned int TriMode>
206 inline std::conditional_t<Cond,ConjugateReturnType,ConstSelfAdjointView>
209 typedef std::conditional_t<Cond,ConjugateReturnType,ConstSelfAdjointView> ReturnType;
210 return ReturnType(
m_matrix.template conjugateIf<Cond>());
221 template<
class Dummy=
int>
284 template<
typename MatrixType,
unsigned int Mode>
287 typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;
291 template<
int UpLo,
int SetOpposite,
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT,
typename Functor,
int Version>
292 class triangular_dense_assignment_kernel<UpLo,
SelfAdjoint,SetOpposite,DstEvaluatorTypeT,SrcEvaluatorTypeT,Functor,Version>
293 :
public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
296 typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Base;
297 typedef typename Base::DstXprType DstXprType;
298 typedef typename Base::SrcXprType SrcXprType;
301 using Base::m_functor;
304 typedef typename Base::DstEvaluatorType DstEvaluatorType;
305 typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
306 typedef typename Base::Scalar Scalar;
307 typedef typename Base::AssignmentTraits AssignmentTraits;
310 EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst,
const SrcEvaluatorType &src,
const Functor &func, DstXprType& dstExpr)
311 : Base(dst, src, func, dstExpr)
317 Scalar tmp = m_src.coeff(
row,
col);
318 m_functor.assignCoeff(m_dst.coeffRef(
row,
col), tmp);
324 Base::assignCoeff(
id,
id);
338 template<
typename Derived>
339 template<
unsigned int UpLo>
355 template<
typename Derived>
356 template<
unsigned int UpLo>
Array< int, Dynamic, 1 > v
RowXpr row(Index i)
This is the const version of row(). */.
ColXpr col(Index i)
This is the const version of col().
#define eigen_internal_assert(x)
#define EIGEN_DEVICE_FUNC
#define EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(SCALAR, EXPR, OPNAME)
#define EIGEN_STATIC_ASSERT_LVALUE(Derived)
#define EIGEN_STATIC_ASSERT(X, MSG)
Matrix< float, 1, Dynamic > MatrixType
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Robust Cholesky decomposition of a matrix with pivoting.
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Base class for all dense matrices, vectors, and expressions.
SelfAdjointViewReturnType< UpLo >::Type selfadjointView()
The matrix class, also used for vectors and row-vectors.
Base::PlainObject PlainObject
Expression of the product of two arbitrary matrices or vectors.
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Matrix< RealScalar, internal::traits< MatrixType >::ColsAtCompileTime, 1 > EigenvaluesReturnType
std::conditional_t< Cond, ConjugateReturnType, ConstSelfAdjointView > conjugateIf() const
EIGEN_CONSTEXPR Index innerStride() const EIGEN_NOEXCEPT
RealScalar operatorNorm() const
Computes the L2 operator norm.
SelfAdjointView< const typename MatrixType::ConstTransposeReturnType, TransposeMode > ConstTransposeReturnType
const MatrixTypeNestedCleaned & nestedExpression() const
TransposeReturnType transpose(std::enable_if_t< Eigen::internal::is_lvalue< MatrixType >::value, Dummy * >=nullptr)
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
const MatrixTypeNestedCleaned & _expression() const
const LLT< PlainObject, UpLo > llt() const
MatrixType::PlainObject PlainObject
SelfAdjointView & rankUpdate(const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha=Scalar(1))
const AdjointReturnType adjoint() const
const LDLT< PlainObject, UpLo > ldlt() const
internal::traits< SelfAdjointView >::MatrixTypeNested MatrixTypeNested
SelfAdjointView(MatrixType &matrix)
const Product< SelfAdjointView, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
MatrixType::StorageIndex StorageIndex
internal::traits< SelfAdjointView >::Scalar Scalar
The type of coefficients in this matrix.
SelfAdjointView< typename MatrixType::TransposeReturnType, TransposeMode > TransposeReturnType
friend const Product< OtherDerived, SelfAdjointView > operator*(const MatrixBase< OtherDerived > &lhs, const SelfAdjointView &rhs)
SelfAdjointView< const MatrixConjugateReturnType, UpLo > ConjugateReturnType
MatrixType::ConstDiagonalReturnType diagonal() const
const ConstTransposeReturnType transpose() const
Scalar coeff(Index row, Index col) const
internal::remove_all_t< typename MatrixType::ConjugateReturnType > MatrixConjugateReturnType
EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
std::conditional_t<(TriMode &(Upper|Lower))==(UpLo &(Upper|Lower)), TriangularView< MatrixType, TriMode >, TriangularView< typename MatrixType::AdjointReturnType, TriMode > > triangularView() const
NumTraits< Scalar >::Real RealScalar
Scalar & coeffRef(Index row, Index col)
MatrixTypeNestedCleaned NestedExpression
const ConjugateReturnType conjugate() const
SelfAdjointView< const typename MatrixType::AdjointReturnType, TransposeMode > AdjointReturnType
MatrixTypeNestedCleaned & nestedExpression()
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
SelfAdjointView & rankUpdate(const MatrixBase< DerivedU > &u, const Scalar &alpha=Scalar(1))
internal::traits< SelfAdjointView >::MatrixTypeNestedCleaned MatrixTypeNestedCleaned
MatrixTypeNested m_matrix
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
friend const SelfAdjointView< const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar, MatrixType, product), UpLo > operator*(const Scalar &s, const SelfAdjointView &mat)
Expression of the transpose of a matrix.
Base class for triangular part in a matrix.
void check_coordinates_internal(Index, Index) const
Expression of a triangular part in a matrix.
const unsigned int PacketAccessBit
const unsigned int LinearAccessBit
const unsigned int DirectAccessBit
const unsigned int LvalueBit
typename remove_all< T >::type remove_all_t
const unsigned int HereditaryBits
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_conjugate_op< typename Derived::Scalar >, const Derived > conj(const Eigen::ArrayBase< Derived > &x)
Eigen::Index Index
The interface type of indices.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.