Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::MatrixWrapper< ExpressionType > Class Template Reference

Expression of an array as a mathematical vector or matrix. More...

#include <src/eigen/Eigen/src/Core/ArrayWrapper.h>

+ Inheritance diagram for Eigen::MatrixWrapper< ExpressionType >:
+ Collaboration diagram for Eigen::MatrixWrapper< ExpressionType >:

Public Types

typedef MatrixBase< MatrixWrapper< ExpressionType > > Base
 
typedef internal::remove_all< ExpressionType >::type NestedExpression
 
typedef internal::conditional< internal::is_lvalue< ExpressionType >::value, Scalar, constScalar >::type ScalarWithConstIfNotLvalue
 
typedef internal::ref_selector< ExpressionType >::non_const_type NestedExpressionType
 
enum  
 
enum  
 
typedef MatrixBase StorageBaseType
 
typedef internal::traits< MatrixWrapper< ExpressionType > >::StorageKind StorageKind
 
typedef internal::traits< MatrixWrapper< ExpressionType > >::StorageIndex StorageIndex
 
typedef internal::traits< MatrixWrapper< ExpressionType > >::Scalar Scalar
 
typedef internal::packet_traits< Scalar >::type PacketScalar
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef Base::CoeffReturnType CoeffReturnType
 
typedef Base::ConstTransposeReturnType ConstTransposeReturnType
 
typedef Base::RowXpr RowXpr
 
typedef Base::ColXpr ColXpr
 
typedef Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
 
typedef Base::PlainObject PlainObject
 
typedef CwiseNullaryOp< internal::scalar_constant_op< Scalar >, PlainObjectConstantReturnType
 
typedef internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, ConstTransposeReturnType >, ConstTransposeReturnType >::type AdjointReturnType
 
typedef Matrix< std::complex< RealScalar >, internal::traits< MatrixWrapper< ExpressionType > >::ColsAtCompileTime, 1, ColMajorEigenvaluesReturnType
 
typedef CwiseNullaryOp< internal::scalar_identity_op< Scalar >, PlainObjectIdentityReturnType
 
typedef Block< const CwiseNullaryOp< internal::scalar_identity_op< Scalar >, SquareMatrixType >, internal::traits< MatrixWrapper< ExpressionType > >::RowsAtCompileTime, internal::traits< MatrixWrapper< ExpressionType > >::ColsAtCompileTimeBasisReturnType
 
typedef Diagonal< MatrixWrapper< ExpressionType > > DiagonalReturnType
 
typedef internal::add_const< Diagonal< constDerived > >::type ConstDiagonalReturnType
 
typedef Diagonal< MatrixWrapper< ExpressionType >, DynamicIndexDiagonalDynamicIndexReturnType
 
typedef internal::add_const< Diagonal< constDerived, DynamicIndex > >::type ConstDiagonalDynamicIndexReturnType
 
typedef Homogeneous< MatrixWrapper< ExpressionType >, HomogeneousReturnTypeDirectionHomogeneousReturnType
 
typedef Block< const MatrixWrapper< ExpressionType >, internal::traits< MatrixWrapper< ExpressionType > >::ColsAtCompileTime==1 ? SizeMinusOne :1, internal::traits< MatrixWrapper< ExpressionType > >::ColsAtCompileTime==1 ? 1 :SizeMinusOneConstStartMinusOne
 
typedef internal::stem_function< Scalar >::type StemFunction
 
enum  {
  RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime , ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime , SizeAtCompileTime , MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime ,
  MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime , MaxSizeAtCompileTime , IsVectorAtCompileTime , Flags = internal::traits<Derived>::Flags ,
  IsRowMajor = int(Flags) & RowMajorBit , InnerSizeAtCompileTime , InnerStrideAtCompileTime = internal::inner_stride_at_compile_time<Derived>::ret , OuterStrideAtCompileTime = internal::outer_stride_at_compile_time<Derived>::ret
}
 
enum  { IsPlainObjectBase = 0 }
 
typedef Eigen::InnerIterator< Derived > InnerIterator
 
typedef Scalar value_type
 
typedef Matrix< typename internal::traits< Derived >::Scalar, internal::traits< Derived >::RowsAtCompileTime, internal::traits< Derived >::ColsAtCompileTime, AutoAlign|(internal::traits< Derived >::Flags &RowMajorBit ? RowMajor :ColMajor), internal::traits< Derived >::MaxRowsAtCompileTime, internal::traits< Derived >::MaxColsAtCompileTimePlainMatrix
 
typedef Array< typename internal::traits< Derived >::Scalar, internal::traits< Derived >::RowsAtCompileTime, internal::traits< Derived >::ColsAtCompileTime, AutoAlign|(internal::traits< Derived >::Flags &RowMajorBit ? RowMajor :ColMajor), internal::traits< Derived >::MaxRowsAtCompileTime, internal::traits< Derived >::MaxColsAtCompileTimePlainArray
 
typedef CwiseNullaryOp< internal::linspaced_op< Scalar, PacketScalar >, PlainObjectSequentialLinSpacedReturnType
 
typedef CwiseNullaryOp< internal::linspaced_op< Scalar, PacketScalar >, PlainObjectRandomAccessLinSpacedReturnType
 
typedef Transpose< Derived > TransposeReturnType
 
typedef internal::add_const_on_value_type< typenameinternal::eval< Derived >::type >::type EvalReturnType
 
typedef VectorwiseOp< Derived, HorizontalRowwiseReturnType
 
typedef const VectorwiseOp< const Derived, HorizontalConstRowwiseReturnType
 
typedef VectorwiseOp< Derived, VerticalColwiseReturnType
 
typedef const VectorwiseOp< const Derived, VerticalConstColwiseReturnType
 
typedef CwiseNullaryOp< internal::scalar_random_op< Scalar >, PlainObjectRandomReturnType
 
typedef Reverse< Derived, BothDirectionsReverseReturnType
 
typedef const Reverse< const Derived, BothDirectionsConstReverseReturnType
 

Public Member Functions

EIGEN_DEVICE_FUNC MatrixWrapper (ExpressionType &matrix)
 
EIGEN_DEVICE_FUNC Index rows () const
 
EIGEN_DEVICE_FUNC Index cols () const
 
EIGEN_DEVICE_FUNC Index outerStride () const
 
EIGEN_DEVICE_FUNC Index innerStride () const
 
EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvaluedata ()
 
EIGEN_DEVICE_FUNC const Scalardata () const
 
EIGEN_DEVICE_FUNC const ScalarcoeffRef (Index rowId, Index colId) const
 
EIGEN_DEVICE_FUNC const ScalarcoeffRef (Index index) const
 
EIGEN_DEVICE_FUNC const internal::remove_all< NestedExpressionType >::type & nestedExpression () const
 
EIGEN_DEVICE_FUNC void resize (Index newSize)
 
EIGEN_DEVICE_FUNC void resize (Index rows, Index cols)
 
EIGEN_DEVICE_FUNC Index diagonalSize () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & operator+= (const MatrixBase< OtherDerived > &other)
 
EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & operator+= (const MatrixBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC MatrixWrapper< ExpressionType > & operator+= (const EigenBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & operator-= (const MatrixBase< OtherDerived > &other)
 
EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & operator-= (const MatrixBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC MatrixWrapper< ExpressionType > & operator-= (const EigenBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC const Product< MatrixWrapper< ExpressionType >, OtherDerived > operator* (const MatrixBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const Product< MatrixWrapper< ExpressionType >, DiagonalDerived, LazyProductoperator* (const DiagonalBase< DiagonalDerived > &diagonal) const
 
const Product< MatrixWrapper< ExpressionType >, DiagonalDerived, LazyProductoperator* (const DiagonalBase< DiagonalDerived > &a_diagonal) const
 
const Product< MatrixWrapper< ExpressionType >, OtherDerived > operator* (const MatrixBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const Product< MatrixWrapper< ExpressionType >, OtherDerived, LazyProductlazyProduct (const MatrixBase< OtherDerived > &other) const
 
const Product< MatrixWrapper< ExpressionType >, OtherDerived, LazyProductlazyProduct (const MatrixBase< OtherDerived > &other) const
 
MatrixWrapper< ExpressionType > & operator*= (const EigenBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & operator*= (const Scalar &other)
 
void applyOnTheLeft (const EigenBase< OtherDerived > &other)
 
void applyOnTheLeft (Index p, Index q, const JacobiRotation< OtherScalar > &j)
 
void applyOnTheRight (const EigenBase< OtherDerived > &other)
 
void applyOnTheRight (Index p, Index q, const JacobiRotation< OtherScalar > &j)
 
EIGEN_DEVICE_FUNC ScalarBinaryOpTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar, typenameinternal::traits< OtherDerived >::Scalar >::ReturnType dot (const MatrixBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScalarBinaryOpTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar, typenameinternal::traits< OtherDerived >::Scalar >::ReturnType dot (const MatrixBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC RealScalar squaredNorm () const
 
EIGEN_DEVICE_FUNC RealScalar norm () const
 
RealScalar stableNorm () const
 
RealScalar blueNorm () const
 
RealScalar hypotNorm () const
 
EIGEN_DEVICE_FUNC const PlainObject normalized () const
 
EIGEN_DEVICE_FUNC const PlainObject stableNormalized () const
 
EIGEN_DEVICE_FUNC void normalize ()
 
EIGEN_DEVICE_FUNC void stableNormalize ()
 
EIGEN_DEVICE_FUNC const AdjointReturnType adjoint () const
 
EIGEN_DEVICE_FUNC void adjointInPlace ()
 
EIGEN_DEVICE_FUNC DiagonalReturnType diagonal ()
 
EIGEN_DEVICE_FUNC ConstDiagonalReturnType diagonal () const
 
EIGEN_DEVICE_FUNC DiagonalIndexReturnType< Index >::Type diagonal ()
 
EIGEN_DEVICE_FUNC ConstDiagonalIndexReturnType< Index >::Type diagonal () const
 
EIGEN_DEVICE_FUNC DiagonalDynamicIndexReturnType diagonal (Index index)
 
EIGEN_DEVICE_FUNC ConstDiagonalDynamicIndexReturnType diagonal (Index index) const
 
EIGEN_DEVICE_FUNC TriangularViewReturnType< Mode >::Type triangularView ()
 
EIGEN_DEVICE_FUNC ConstTriangularViewReturnType< Mode >::Type triangularView () const
 
MatrixBase< MatrixWrapper< ExpressionType > >::template TriangularViewReturnType< Mode >::Type triangularView ()
 
MatrixBase< MatrixWrapper< ExpressionType > >::template ConstTriangularViewReturnType< Mode >::Type triangularView () const
 
EIGEN_DEVICE_FUNC SelfAdjointViewReturnType< UpLo >::Type selfadjointView ()
 
EIGEN_DEVICE_FUNC ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView () const
 
MatrixBase< MatrixWrapper< ExpressionType > >::template ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView () const
 
MatrixBase< MatrixWrapper< ExpressionType > >::template SelfAdjointViewReturnType< UpLo >::Type selfadjointView ()
 
const SparseView< MatrixWrapper< ExpressionType > > sparseView (const Scalar &m_reference=Scalar(0), const typename NumTraits< Scalar >::Real &m_epsilon=NumTraits< Scalar >::dummy_precision()) const
 
EIGEN_DEVICE_FUNC const DiagonalWrapper< const MatrixWrapper< ExpressionType > > asDiagonal () const
 
const PermutationWrapper< const MatrixWrapper< ExpressionType > > asPermutation () const
 
EIGEN_DEVICE_FUNC MatrixWrapper< ExpressionType > & setIdentity ()
 
EIGEN_DEVICE_FUNC MatrixWrapper< ExpressionType > & setIdentity (Index rows, Index cols)
 Resizes to the given size, and writes the identity expression (not necessarily square) into *this.
 
bool isIdentity (const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
bool isDiagonal (const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
bool isUpperTriangular (const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
bool isLowerTriangular (const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
bool isOrthogonal (const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
bool isUnitary (const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
EIGEN_DEVICE_FUNC bool operator== (const MatrixBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC bool operator!= (const MatrixBase< OtherDerived > &other) const
 
NoAlias< MatrixWrapper< ExpressionType >, Eigen::MatrixBasenoalias ()
 
const MatrixWrapper< ExpressionType > & forceAlignedAccess () const
 
MatrixWrapper< ExpressionType > & forceAlignedAccess ()
 
const MatrixWrapper< ExpressionType > & forceAlignedAccessIf () const
 
MatrixWrapper< ExpressionType > & forceAlignedAccessIf ()
 
internal::add_const_on_value_type< typenameinternal::conditional< Enable, ForceAlignedAccess< MatrixWrapper< ExpressionType > >, MatrixWrapper< ExpressionType > & >::type >::type forceAlignedAccessIf () const
 
internal::conditional< Enable, ForceAlignedAccess< MatrixWrapper< ExpressionType > >, MatrixWrapper< ExpressionType > & >::type forceAlignedAccessIf ()
 
EIGEN_DEVICE_FUNC Scalar trace () const
 
EIGEN_DEVICE_FUNC RealScalar lpNorm () const
 
NumTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar >::Real lpNorm () const
 
EIGEN_DEVICE_FUNC MatrixBase< MatrixWrapper< ExpressionType > > & matrix ()
 
EIGEN_DEVICE_FUNC const MatrixBase< MatrixWrapper< ExpressionType > > & matrix () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ArrayWrapper< MatrixWrapper< ExpressionType > > array ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArrayWrapper< const MatrixWrapper< ExpressionType > > array () const
 
const FullPivLU< PlainObjectfullPivLu () const
 
const PartialPivLU< PlainObjectpartialPivLu () const
 
const PartialPivLU< PlainObjectlu () const
 
const Inverse< MatrixWrapper< ExpressionType > > inverse () const
 
void computeInverseAndDetWithCheck (ResultType &inverse, typename ResultType::Scalar &determinant, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
 
void computeInverseWithCheck (ResultType &inverse, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
 
Scalar determinant () const
 
const LLT< PlainObjectllt () const
 
const LDLT< PlainObjectldlt () const
 
const HouseholderQR< PlainObjecthouseholderQr () const
 
const ColPivHouseholderQR< PlainObjectcolPivHouseholderQr () const
 
const FullPivHouseholderQR< PlainObjectfullPivHouseholderQr () const
 
const CompleteOrthogonalDecomposition< PlainObjectcompleteOrthogonalDecomposition () const
 
EigenvaluesReturnType eigenvalues () const
 Computes the eigenvalues of a matrix.
 
RealScalar operatorNorm () const
 Computes the L2 operator norm.
 
JacobiSVD< PlainObjectjacobiSvd (unsigned int computationOptions=0) const
 
BDCSVD< PlainObjectbdcSvd (unsigned int computationOptions=0) const
 
EIGEN_DEVICE_FUNC cross_product_return_type< OtherDerived >::type cross (const MatrixBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC MatrixBase< MatrixWrapper< ExpressionType > >::template cross_product_return_type< OtherDerived >::type cross (const MatrixBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC PlainObject cross3 (const MatrixBase< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC PlainObject unitOrthogonal (void) const
 
EIGEN_DEVICE_FUNC Matrix< Scalar, 3, 1 > eulerAngles (Index a0, Index a1, Index a2) const
 
EIGEN_DEVICE_FUNC HomogeneousReturnType homogeneous () const
 
typedef EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE (ConstStartMinusOne, Scalar, quotient) HNormalizedReturnType
 
EIGEN_DEVICE_FUNC const HNormalizedReturnType hnormalized () const
 homogeneous normalization
 
void makeHouseholderInPlace (Scalar &tau, RealScalar &beta)
 
void makeHouseholder (EssentialPart &essential, Scalar &tau, RealScalar &beta) const
 
void applyHouseholderOnTheLeft (const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
 
void applyHouseholderOnTheRight (const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
 
EIGEN_STRONG_INLINE const SparseMatrixBase< OtherDerived >::template CwiseProductDenseReturnType< MatrixWrapper< ExpressionType > >::Type cwiseProduct (const SparseMatrixBase< OtherDerived > &other) const
 
const MatrixFunctionReturnValue< MatrixWrapper< ExpressionType > > matrixFunction (StemFunction f) const
 Helper function for the unsupported MatrixFunctions module.
 
EIGEN_DEVICE_FUNC MatrixWrapper< ExpressionType > & lazyAssign (const DenseBase< OtherDerived > &other)
 
EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & lazyAssign (const DenseBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvalReturnType eval () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & operator/= (const Scalar &other)
 
EIGEN_DEVICE_FUNC Index nonZeros () const
 
EIGEN_DEVICE_FUNC Index outerSize () const
 
EIGEN_DEVICE_FUNC Index innerSize () const
 
EIGEN_DEVICE_FUNC CommaInitializer< Derived > operator<< (const Scalar &s)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC CommaInitializer< Derived > operator<< (const DenseBase< OtherDerived > &other)
 
template<typename OtherDerived >
CommaInitializer< Derived > operator<< (const DenseBase< OtherDerived > &other)
 
template<unsigned int Added, unsigned int Removed>
EIGEN_DEPRECATED const Derived & flagged () const
 
EIGEN_DEVICE_FUNC TransposeReturnType transpose ()
 
EIGEN_DEVICE_FUNC ConstTransposeReturnType transpose () const
 
EIGEN_DEVICE_FUNC void transposeInPlace ()
 
template<typename CustomNullaryOp >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseNullaryOp< CustomNullaryOp, typename DenseBase< Derived >::PlainObjectNullaryExpr (Index rows, Index cols, const CustomNullaryOp &func)
 
template<typename CustomNullaryOp >
EIGEN_STRONG_INLINE const CwiseNullaryOp< CustomNullaryOp, typename DenseBase< Derived >::PlainObjectNullaryExpr (Index size, const CustomNullaryOp &func)
 
template<typename CustomNullaryOp >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseNullaryOp< CustomNullaryOp, typename DenseBase< Derived >::PlainObjectNullaryExpr (const CustomNullaryOp &func)
 
EIGEN_DEVICE_FUNC void fill (const Scalar &value)
 
EIGEN_DEVICE_FUNC Derived & setConstant (const Scalar &value)
 
EIGEN_DEVICE_FUNC Derived & setLinSpaced (Index size, const Scalar &low, const Scalar &high)
 Sets a linearly spaced vector.
 
EIGEN_DEVICE_FUNC Derived & setLinSpaced (const Scalar &low, const Scalar &high)
 Sets a linearly spaced vector.
 
EIGEN_DEVICE_FUNC Derived & setZero ()
 
EIGEN_DEVICE_FUNC Derived & setOnes ()
 
EIGEN_DEVICE_FUNC Derived & setRandom ()
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC bool isApprox (const DenseBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
template<typename OtherDerived >
bool isApprox (const DenseBase< OtherDerived > &other, const RealScalar &prec) const
 
EIGEN_DEVICE_FUNC bool isMuchSmallerThan (const RealScalar &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC bool isMuchSmallerThan (const DenseBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
template<typename Derived >
bool isMuchSmallerThan (const typename NumTraits< Scalar >::Real &other, const RealScalar &prec) const
 
template<typename OtherDerived >
bool isMuchSmallerThan (const DenseBase< OtherDerived > &other, const RealScalar &prec) const
 
EIGEN_DEVICE_FUNC bool isApproxToConstant (const Scalar &value, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
EIGEN_DEVICE_FUNC bool isConstant (const Scalar &value, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
EIGEN_DEVICE_FUNC bool isZero (const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
EIGEN_DEVICE_FUNC bool isOnes (const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
bool hasNaN () const
 
bool allFinite () const
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC void swap (const DenseBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC void swap (PlainObjectBase< OtherDerived > &other)
 
EIGEN_DEVICE_FUNC const NestByValue< Derived > nestByValue () const
 
EIGEN_DEVICE_FUNC Scalar sum () const
 
EIGEN_DEVICE_FUNC Scalar mean () const
 
EIGEN_DEVICE_FUNC Scalar prod () const
 
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar minCoeff () const
 
template<typename IndexType >
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar minCoeff (IndexType *row, IndexType *col) const
 
template<typename IndexType >
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar minCoeff (IndexType *index) const
 
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar maxCoeff () const
 
template<typename IndexType >
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar maxCoeff (IndexType *row, IndexType *col) const
 
template<typename IndexType >
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar maxCoeff (IndexType *index) const
 
template<typename BinaryOp >
EIGEN_DEVICE_FUNC Scalar redux (const BinaryOp &func) const
 
template<typename Func >
EIGEN_STRONG_INLINE internal::traits< Derived >::Scalar redux (const Func &func) const
 
template<typename Visitor >
EIGEN_DEVICE_FUNC void visit (Visitor &func) const
 
const WithFormat< Derived > format (const IOFormat &fmt) const
 
EIGEN_DEVICE_FUNC CoeffReturnType value () const
 
EIGEN_DEVICE_FUNC bool all () const
 
EIGEN_DEVICE_FUNC bool any () const
 
EIGEN_DEVICE_FUNC Index count () const
 
EIGEN_DEVICE_FUNC ConstRowwiseReturnType rowwise () const
 
EIGEN_DEVICE_FUNC RowwiseReturnType rowwise ()
 
EIGEN_DEVICE_FUNC ConstColwiseReturnType colwise () const
 
EIGEN_DEVICE_FUNC ColwiseReturnType colwise ()
 
template<typename ThenDerived , typename ElseDerived >
const Select< Derived, ThenDerived, ElseDerived > select (const DenseBase< ThenDerived > &thenMatrix, const DenseBase< ElseDerived > &elseMatrix) const
 
template<typename ThenDerived >
const Select< Derived, ThenDerived, typename ThenDerived::ConstantReturnType > select (const DenseBase< ThenDerived > &thenMatrix, const typename ThenDerived::Scalar &elseScalar) const
 
template<typename ElseDerived >
const Select< Derived, typename ElseDerived::ConstantReturnType, ElseDerived > select (const typename ElseDerived::Scalar &thenScalar, const DenseBase< ElseDerived > &elseMatrix) const
 
template<int RowFactor, int ColFactor>
EIGEN_DEVICE_FUNC const Replicate< Derived, RowFactor, ColFactor > replicate () const
 
EIGEN_DEVICE_FUNC const Replicate< Derived, Dynamic, Dynamicreplicate (Index rowFactor, Index colFactor) const
 
template<int RowFactor, int ColFactor>
const Replicate< Derived, RowFactor, ColFactor > replicate () const
 
EIGEN_DEVICE_FUNC ReverseReturnType reverse ()
 
EIGEN_DEVICE_FUNC ConstReverseReturnType reverse () const
 
EIGEN_DEVICE_FUNC void reverseInPlace ()
 
template<typename Dest >
EIGEN_DEVICE_FUNC void evalTo (Dest &) const
 

Static Public Member Functions

static EIGEN_DEVICE_FUNC const IdentityReturnType Identity ()
 
static EIGEN_DEVICE_FUNC const IdentityReturnType Identity (Index rows, Index cols)
 
static EIGEN_DEVICE_FUNC const BasisReturnType Unit (Index size, Index i)
 
static EIGEN_DEVICE_FUNC const BasisReturnType Unit (Index i)
 
static EIGEN_DEVICE_FUNC const BasisReturnType UnitX ()
 
static EIGEN_DEVICE_FUNC const BasisReturnType UnitY ()
 
static EIGEN_DEVICE_FUNC const BasisReturnType UnitZ ()
 
static EIGEN_DEVICE_FUNC const BasisReturnType UnitW ()
 
static EIGEN_DEVICE_FUNC const ConstantReturnType Constant (Index rows, Index cols, const Scalar &value)
 
static EIGEN_DEVICE_FUNC const ConstantReturnType Constant (Index size, const Scalar &value)
 
static EIGEN_DEVICE_FUNC const ConstantReturnType Constant (const Scalar &value)
 
static EIGEN_DEVICE_FUNC const SequentialLinSpacedReturnType LinSpaced (Sequential_t, Index size, const Scalar &low, const Scalar &high)
 
static EIGEN_DEVICE_FUNC const RandomAccessLinSpacedReturnType LinSpaced (Index size, const Scalar &low, const Scalar &high)
 Sets a linearly spaced vector.
 
static EIGEN_DEVICE_FUNC const SequentialLinSpacedReturnType LinSpaced (Sequential_t, const Scalar &low, const Scalar &high)
 
static EIGEN_DEVICE_FUNC const RandomAccessLinSpacedReturnType LinSpaced (const Scalar &low, const Scalar &high)
 Sets a linearly spaced vector.
 
template<typename CustomNullaryOp >
static EIGEN_DEVICE_FUNC const CwiseNullaryOp< CustomNullaryOp, PlainObjectNullaryExpr (Index rows, Index cols, const CustomNullaryOp &func)
 
template<typename CustomNullaryOp >
static EIGEN_DEVICE_FUNC const CwiseNullaryOp< CustomNullaryOp, PlainObjectNullaryExpr (Index size, const CustomNullaryOp &func)
 
template<typename CustomNullaryOp >
static EIGEN_DEVICE_FUNC const CwiseNullaryOp< CustomNullaryOp, PlainObjectNullaryExpr (const CustomNullaryOp &func)
 
static EIGEN_DEVICE_FUNC const ConstantReturnType Zero (Index rows, Index cols)
 
static EIGEN_DEVICE_FUNC const ConstantReturnType Zero (Index size)
 
static EIGEN_DEVICE_FUNC const ConstantReturnType Zero ()
 
static EIGEN_DEVICE_FUNC const ConstantReturnType Ones (Index rows, Index cols)
 
static EIGEN_DEVICE_FUNC const ConstantReturnType Ones (Index size)
 
static EIGEN_DEVICE_FUNC const ConstantReturnType Ones ()
 
static const RandomReturnType Random (Index rows, Index cols)
 
static const RandomReturnType Random (Index size)
 
static const RandomReturnType Random ()
 

Protected Member Functions

MatrixWrapper< ExpressionType > & operator+= (const ArrayBase< OtherDerived > &)
 
MatrixWrapper< ExpressionType > & operator-= (const ArrayBase< OtherDerived > &)
 

Protected Attributes

NestedExpressionType m_expression
 

Related Symbols

(Note that these are not member symbols.)

template<typename Derived >
std::ostream & operator<< (std::ostream &s, const DenseBase< Derived > &m)
 

Detailed Description

template<typename ExpressionType>
class Eigen::MatrixWrapper< ExpressionType >

Expression of an array as a mathematical vector or matrix.

This class is the return type of ArrayBase::matrix(), and most of the time this is the only way it is use.

See also
MatrixBase::matrix(), class ArrayWrapper

Member Typedef Documentation

◆ AdjointReturnType

◆ Base

template<typename ExpressionType >
typedef MatrixBase<MatrixWrapper<ExpressionType> > Eigen::MatrixWrapper< ExpressionType >::Base

◆ BasisReturnType

◆ CoeffReturnType

typedef Base::CoeffReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::CoeffReturnType
inherited

◆ ColwiseReturnType

template<typename Derived >
typedef VectorwiseOp<Derived, Vertical> Eigen::DenseBase< Derived >::ColwiseReturnType
inherited

◆ ColXpr

typedef Base::ColXpr Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::ColXpr
inherited

◆ ConstantReturnType

typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,PlainObject> Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::ConstantReturnType
inherited

◆ ConstColwiseReturnType

template<typename Derived >
typedef const VectorwiseOp<const Derived, Vertical> Eigen::DenseBase< Derived >::ConstColwiseReturnType
inherited

◆ ConstDiagonalDynamicIndexReturnType

typedef internal::add_const<Diagonal<constDerived,DynamicIndex>>::type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::ConstDiagonalDynamicIndexReturnType
inherited

◆ ConstDiagonalReturnType

typedef internal::add_const<Diagonal<constDerived>>::type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::ConstDiagonalReturnType
inherited

◆ ConstReverseReturnType

template<typename Derived >
typedef const Reverse<const Derived, BothDirections> Eigen::DenseBase< Derived >::ConstReverseReturnType
inherited

◆ ConstRowwiseReturnType

template<typename Derived >
typedef const VectorwiseOp<const Derived, Horizontal> Eigen::DenseBase< Derived >::ConstRowwiseReturnType
inherited

◆ ConstStartMinusOne

typedef Block<const MatrixWrapper< ExpressionType > , internal::traits<MatrixWrapper< ExpressionType > >::ColsAtCompileTime==1 ? SizeMinusOne : 1, internal::traits<MatrixWrapper< ExpressionType > >::ColsAtCompileTime==1 ? 1 : SizeMinusOne> Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::ConstStartMinusOne
inherited

◆ ConstTransposeReturnType

typedef Base::ConstTransposeReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::ConstTransposeReturnType
inherited

◆ DiagonalDynamicIndexReturnType

typedef Diagonal<MatrixWrapper< ExpressionType > ,DynamicIndex> Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::DiagonalDynamicIndexReturnType
inherited

◆ DiagonalReturnType

typedef Diagonal<MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::DiagonalReturnType
inherited

◆ EigenvaluesReturnType

typedef Matrix<std::complex<RealScalar>, internal::traits<MatrixWrapper< ExpressionType > >::ColsAtCompileTime, 1, ColMajor> Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::EigenvaluesReturnType
inherited

◆ EvalReturnType

template<typename Derived >
typedef internal::add_const_on_value_type<typenameinternal::eval<Derived>::type>::type Eigen::DenseBase< Derived >::EvalReturnType
inherited

◆ HomogeneousReturnType

typedef Homogeneous<MatrixWrapper< ExpressionType > , HomogeneousReturnTypeDirection> Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::HomogeneousReturnType
inherited

◆ IdentityReturnType

typedef CwiseNullaryOp<internal::scalar_identity_op<Scalar>,PlainObject> Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::IdentityReturnType
inherited

◆ InnerIterator

template<typename Derived >
typedef Eigen::InnerIterator<Derived> Eigen::DenseBase< Derived >::InnerIterator
inherited

Inner iterator type to iterate over the coefficients of a row or column.

See also
class InnerIterator

◆ NestedExpression

template<typename ExpressionType >
typedef internal::remove_all<ExpressionType>::type Eigen::MatrixWrapper< ExpressionType >::NestedExpression

◆ NestedExpressionType

template<typename ExpressionType >
typedef internal::ref_selector<ExpressionType>::non_const_type Eigen::MatrixWrapper< ExpressionType >::NestedExpressionType

◆ PacketScalar

typedef internal::packet_traits<Scalar>::type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::PacketScalar
inherited

◆ PlainArray

The plain array type corresponding to this expression.

See also
PlainObject

◆ PlainMatrix

The plain matrix type corresponding to this expression.

See also
PlainObject

◆ PlainObject

typedef Base::PlainObject Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject
inherited

◆ RandomAccessLinSpacedReturnType

template<typename Derived >
typedef CwiseNullaryOp<internal::linspaced_op<Scalar,PacketScalar>,PlainObject> Eigen::DenseBase< Derived >::RandomAccessLinSpacedReturnType
inherited

◆ RandomReturnType

template<typename Derived >
typedef CwiseNullaryOp<internal::scalar_random_op<Scalar>,PlainObject> Eigen::DenseBase< Derived >::RandomReturnType
inherited

◆ RealScalar

typedef NumTraits<Scalar>::Real Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::RealScalar
inherited

◆ ReverseReturnType

template<typename Derived >
typedef Reverse<Derived, BothDirections> Eigen::DenseBase< Derived >::ReverseReturnType
inherited

◆ RowwiseReturnType

template<typename Derived >
typedef VectorwiseOp<Derived, Horizontal> Eigen::DenseBase< Derived >::RowwiseReturnType
inherited

◆ RowXpr

typedef Base::RowXpr Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::RowXpr
inherited

◆ Scalar

typedef internal::traits<MatrixWrapper< ExpressionType > >::Scalar Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::Scalar
inherited

◆ ScalarWithConstIfNotLvalue

template<typename ExpressionType >
typedef internal::conditional<internal::is_lvalue<ExpressionType>::value,Scalar,constScalar>::type Eigen::MatrixWrapper< ExpressionType >::ScalarWithConstIfNotLvalue

◆ SequentialLinSpacedReturnType

template<typename Derived >
typedef CwiseNullaryOp<internal::linspaced_op<Scalar,PacketScalar>,PlainObject> Eigen::DenseBase< Derived >::SequentialLinSpacedReturnType
inherited

◆ SquareMatrixType

type of the equivalent square matrix

◆ StemFunction

typedef internal::stem_function<Scalar>::type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::StemFunction
inherited

◆ StorageBaseType

typedef MatrixBase Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::StorageBaseType
inherited

◆ StorageIndex

typedef internal::traits<MatrixWrapper< ExpressionType > >::StorageIndex Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::StorageIndex
inherited

◆ StorageKind

typedef internal::traits<MatrixWrapper< ExpressionType > >::StorageKind Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::StorageKind
inherited

◆ TransposeReturnType

template<typename Derived >
typedef Transpose<Derived> Eigen::DenseBase< Derived >::TransposeReturnType
inherited

◆ value_type

template<typename Derived >
typedef Scalar Eigen::DenseBase< Derived >::value_type
inherited

The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc.

It is an alias for the Scalar type

Member Enumeration Documentation

◆ anonymous enum

template<typename Derived >
anonymous enum
inherited
Enumerator
RowsAtCompileTime 

The number of rows at compile-time. This is just a copy of the value provided by the Derived type. If a value is not known at compile-time, it is set to the Dynamic constant.

See also
MatrixBase::rows(), MatrixBase::cols(), ColsAtCompileTime, SizeAtCompileTime
ColsAtCompileTime 

The number of columns at compile-time. This is just a copy of the value provided by the Derived type. If a value is not known at compile-time, it is set to the Dynamic constant.

See also
MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime
SizeAtCompileTime 

This is equal to the number of coefficients, i.e. the number of rows times the number of columns, or to Dynamic if this is not known at compile-time.

See also
RowsAtCompileTime, ColsAtCompileTime
MaxRowsAtCompileTime 

This value is equal to the maximum possible number of rows that this expression might have. If this expression might have an arbitrarily high number of rows, this value is set to Dynamic.

This value is useful to know when evaluating an expression, in order to determine whether it is possible to avoid doing a dynamic memory allocation.

See also
RowsAtCompileTime, MaxColsAtCompileTime, MaxSizeAtCompileTime
MaxColsAtCompileTime 

This value is equal to the maximum possible number of columns that this expression might have. If this expression might have an arbitrarily high number of columns, this value is set to Dynamic.

This value is useful to know when evaluating an expression, in order to determine whether it is possible to avoid doing a dynamic memory allocation.

See also
ColsAtCompileTime, MaxRowsAtCompileTime, MaxSizeAtCompileTime
MaxSizeAtCompileTime 

This value is equal to the maximum possible number of coefficients that this expression might have. If this expression might have an arbitrarily high number of coefficients, this value is set to Dynamic.

This value is useful to know when evaluating an expression, in order to determine whether it is possible to avoid doing a dynamic memory allocation.

See also
SizeAtCompileTime, MaxRowsAtCompileTime, MaxColsAtCompileTime
IsVectorAtCompileTime 

This is set to true if either the number of rows or the number of columns is known at compile-time to be equal to 1. Indeed, in that case, we are dealing with a column-vector (if there is only one column) or with a row-vector (if there is only one row).

Flags 

This stores expression Flags flags which may or may not be inherited by new expressions constructed from this one. See the list of flags.

IsRowMajor 

True if this expression has row-major storage order.

InnerSizeAtCompileTime 
InnerStrideAtCompileTime 
OuterStrideAtCompileTime 
98 {
99
100 RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
106 ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
113 SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
114 internal::traits<Derived>::ColsAtCompileTime>::ret),
119 MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
130 MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
141 MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
142 internal::traits<Derived>::MaxColsAtCompileTime>::ret),
153 IsVectorAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime == 1
154 || internal::traits<Derived>::MaxColsAtCompileTime == 1,
160 Flags = internal::traits<Derived>::Flags,
165 IsRowMajor = int(Flags) & RowMajorBit,
169
170 InnerStrideAtCompileTime = internal::inner_stride_at_compile_time<Derived>::ret,
171 OuterStrideAtCompileTime = internal::outer_stride_at_compile_time<Derived>::ret
172 };
@ IsVectorAtCompileTime
Definition DenseBase.h:153
@ SizeAtCompileTime
Definition DenseBase.h:113
@ MaxSizeAtCompileTime
Definition DenseBase.h:141
@ IsRowMajor
Definition DenseBase.h:165
@ OuterStrideAtCompileTime
Definition DenseBase.h:171
@ Flags
Definition DenseBase.h:160
@ ColsAtCompileTime
Definition DenseBase.h:106
@ InnerSizeAtCompileTime
Definition DenseBase.h:167
@ InnerStrideAtCompileTime
Definition DenseBase.h:170
@ MaxColsAtCompileTime
Definition DenseBase.h:130
@ MaxRowsAtCompileTime
Definition DenseBase.h:119
@ RowsAtCompileTime
Definition DenseBase.h:100
const unsigned int RowMajorBit
Definition Constants.h:61
Definition Eigen_Colamd.h:50

◆ anonymous enum

template<typename Derived >
anonymous enum
inherited
Enumerator
IsPlainObjectBase 
176{ IsPlainObjectBase = 0 };
@ IsPlainObjectBase
Definition DenseBase.h:176

◆ anonymous enum

anonymous enum
inherited
397 { HomogeneousReturnTypeDirection = ColsAtCompileTime==1&&RowsAtCompileTime==1 ? ((internal::traits<Derived>::Flags&RowMajorBit)==RowMajorBit ? Horizontal : Vertical)
@ HomogeneousReturnTypeDirection
Definition MatrixBase.h:397
@ Horizontal
Definition Constants.h:268
@ Vertical
Definition Constants.h:265

◆ anonymous enum

anonymous enum
inherited
403 {
405 };
const int Dynamic
Definition Constants.h:21

Constructor & Destructor Documentation

◆ MatrixWrapper()

template<typename ExpressionType >
EIGEN_DEVICE_FUNC Eigen::MatrixWrapper< ExpressionType >::MatrixWrapper ( ExpressionType &  matrix)
inlineexplicit
EIGEN_DEVICE_FUNC MatrixBase< MatrixWrapper< ExpressionType > > & matrix()
Definition MatrixBase.h:312
NestedExpressionType m_expression
Definition ArrayWrapper.h:204

Member Function Documentation

◆ adjoint()

const MatrixBase< MatrixWrapper< ExpressionType > >::AdjointReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::adjoint
inlineinherited
Returns
an expression of the adjoint (i.e. conjugate transpose) of *this.

Example:

Output:

Warning
If you want to replace a matrix by its own adjoint, do NOT do this:
m = m.adjoint(); // bug!!! caused by aliasing effect
Instead, use the adjointInPlace() method:
m.adjointInPlace();
which gives Eigen good opportunities for optimization, or alternatively you can also do:
m = m.adjoint().eval();
See also
adjointInPlace(), transpose(), conjugate(), class Transpose, class internal::scalar_conjugate_op
211{
212 return AdjointReturnType(this->transpose());
213}
EIGEN_DEVICE_FUNC TransposeReturnType transpose()
Definition Transpose.h:172
internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, ConstTransposeReturnType >, ConstTransposeReturnType >::type AdjointReturnType
Definition MatrixBase.h:112

◆ adjointInPlace()

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::adjointInPlace
inlineinherited

This is the "in place" version of adjoint(): it replaces *this by its own transpose. Thus, doing

m.adjointInPlace();

has the same effect on m as doing

m = m.adjoint().eval();

and is faster and also safer because in the latter line of code, forgetting the eval() results in a bug caused by aliasing.

Notice however that this method is only useful if you want to replace a matrix by its own adjoint. If you just need the adjoint of a matrix, use adjoint().

Note
if the matrix is not square, then *this must be a resizable matrix. This excludes (non-square) fixed-size matrices, block-expressions and maps.
See also
transpose(), adjoint(), transposeInPlace()
316{
317 derived() = adjoint().eval();
318}
EIGEN_DEVICE_FUNC const AdjointReturnType adjoint() const
Definition Transpose.h:210

◆ all()

template<typename Derived >
bool Eigen::DenseBase< Derived >::all
inlineinherited
Returns
true if all coefficients are true

Example:

Output:

See also
any(), Cwise::operator<()
82{
83 typedef internal::evaluator<Derived> Evaluator;
84 enum {
85 unroll = SizeAtCompileTime != Dynamic
86 && SizeAtCompileTime * (Evaluator::CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT
87 };
88 Evaluator evaluator(derived());
89 if(unroll)
90 return internal::all_unroller<Evaluator, unroll ? int(SizeAtCompileTime) : Dynamic>::run(evaluator);
91 else
92 {
93 for(Index j = 0; j < cols(); ++j)
94 for(Index i = 0; i < rows(); ++i)
95 if (!evaluator.coeff(i, j)) return false;
96 return true;
97 }
98}
#define EIGEN_UNROLLING_LIMIT
Definition Settings.h:24
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:33
size_t cols(const T &raster)
Definition MarchingSquares.hpp:60
size_t rows(const T &raster)
Definition MarchingSquares.hpp:55

References Eigen::Dynamic, and EIGEN_UNROLLING_LIMIT.

◆ allFinite()

template<typename Derived >
bool Eigen::DenseBase< Derived >::allFinite
inlineinherited
Returns
true if *this contains only finite numbers, i.e., no NaN and no +/-INF values.
See also
hasNaN()
154{
155#if EIGEN_COMP_MSVC || (defined __FAST_MATH__)
156 return derived().array().isFinite().all();
157#else
158 return !((derived()-derived()).hasNaN());
159#endif
160}
bool hasNaN() const
Definition BooleanRedux.h:139

◆ any()

template<typename Derived >
bool Eigen::DenseBase< Derived >::any
inlineinherited
Returns
true if at least one coefficient is true
See also
all()
106{
107 typedef internal::evaluator<Derived> Evaluator;
108 enum {
109 unroll = SizeAtCompileTime != Dynamic
110 && SizeAtCompileTime * (Evaluator::CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT
111 };
112 Evaluator evaluator(derived());
113 if(unroll)
114 return internal::any_unroller<Evaluator, unroll ? int(SizeAtCompileTime) : Dynamic>::run(evaluator);
115 else
116 {
117 for(Index j = 0; j < cols(); ++j)
118 for(Index i = 0; i < rows(); ++i)
119 if (evaluator.coeff(i, j)) return true;
120 return false;
121 }
122}

References Eigen::Dynamic, and EIGEN_UNROLLING_LIMIT.

◆ applyHouseholderOnTheLeft()

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::applyHouseholderOnTheLeft ( const EssentialPart &  essential,
const Scalar tau,
Scalar workspace 
)
inherited

Apply the elementary reflector H given by $ H = I - tau v v^*$ with $ v^T = [1 essential^T] $ from the left to a vector or matrix.

On input:

Parameters
essentialthe essential part of the vector v
tauthe scaling factor of the Householder transformation
workspacea pointer to working space with at least this->cols() * essential.size() entries
See also
MatrixBase::makeHouseholder(), MatrixBase::makeHouseholderInPlace(), MatrixBase::applyHouseholderOnTheRight()
117{
118 if(rows() == 1)
119 {
120 *this *= Scalar(1)-tau;
121 }
122 else if(tau!=Scalar(0))
123 {
124 Map<typename internal::plain_row_type<PlainObject>::type> tmp(workspace,cols());
125 Block<Derived, EssentialPart::SizeAtCompileTime, Derived::ColsAtCompileTime> bottom(derived(), 1, 0, rows()-1, cols());
126 tmp.noalias() = essential.adjoint() * bottom;
127 tmp += this->row(0);
128 this->row(0) -= tau * tmp;
129 bottom.noalias() -= tau * essential * tmp;
130 }
131}
EIGEN_DEVICE_FUNC RowXpr row(Index i)
This is the const version of row(). *‍/.
Definition BlockMethods.h:859
internal::traits< MatrixWrapper< ExpressionType > >::Scalar Scalar
Definition MatrixBase.h:56

◆ applyHouseholderOnTheRight()

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::applyHouseholderOnTheRight ( const EssentialPart &  essential,
const Scalar tau,
Scalar workspace 
)
inherited

Apply the elementary reflector H given by $ H = I - tau v v^*$ with $ v^T = [1 essential^T] $ from the right to a vector or matrix.

On input:

Parameters
essentialthe essential part of the vector v
tauthe scaling factor of the Householder transformation
workspacea pointer to working space with at least this->cols() * essential.size() entries
See also
MatrixBase::makeHouseholder(), MatrixBase::makeHouseholderInPlace(), MatrixBase::applyHouseholderOnTheLeft()
154{
155 if(cols() == 1)
156 {
157 *this *= Scalar(1)-tau;
158 }
159 else if(tau!=Scalar(0))
160 {
161 Map<typename internal::plain_col_type<PlainObject>::type> tmp(workspace,rows());
162 Block<Derived, Derived::RowsAtCompileTime, EssentialPart::SizeAtCompileTime> right(derived(), 0, 1, rows(), cols()-1);
163 tmp.noalias() = right * essential.conjugate();
164 tmp += this->col(0);
165 this->col(0) -= tau * tmp;
166 right.noalias() -= tau * tmp * essential.transpose();
167 }
168}
EIGEN_DEVICE_FUNC ColXpr col(Index i)
This is the const version of col().
Definition BlockMethods.h:838

◆ applyOnTheLeft() [1/2]

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::applyOnTheLeft ( const EigenBase< OtherDerived > &  other)
inlineinherited

replaces *this by other * *this.

Example:

Output:

 
523{
524 other.derived().applyThisOnTheLeft(derived());
525}

◆ applyOnTheLeft() [2/2]

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::applyOnTheLeft ( Index  p,
Index  q,
const JacobiRotation< OtherScalar > &  j 
)
inlineinherited

\jacobi_module Applies the rotation in the plane j to the rows p and q of *this, i.e., it computes B = J * B, with $ B = \left ( \begin{array}{cc} \text{*this.row}(p) \\ \text{*this.row}(q) \end{array} \right ) $.

See also
class JacobiRotation, MatrixBase::applyOnTheRight(), internal::apply_rotation_in_the_plane()
278{
279 RowXpr x(this->row(p));
280 RowXpr y(this->row(q));
281 internal::apply_rotation_in_the_plane(x, y, j);
282}
Block< Derived, 1, internal::traits< Derived >::ColsAtCompileTime, IsRowMajor > RowXpr
Definition BlockMethods.h:17
const Scalar & y
Definition MathFunctions.h:552
TCoord< P > x(const P &p)
Definition geometry_traits.hpp:297

◆ applyOnTheRight() [1/2]

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::applyOnTheRight ( const EigenBase< OtherDerived > &  other)
inlineinherited

replaces *this by *this * other. It is equivalent to MatrixBase::operator*=().

Example:

Output:

 
511{
512 other.derived().applyThisOnTheRight(derived());
513}

◆ applyOnTheRight() [2/2]

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::applyOnTheRight ( Index  p,
Index  q,
const JacobiRotation< OtherScalar > &  j 
)
inlineinherited

Applies the rotation in the plane j to the columns p and q of *this, i.e., it computes B = B * J with $ B = \left ( \begin{array}{cc} \text{*this.col}(p) & \text{*this.col}(q) \end{array} \right ) $.

See also
class JacobiRotation, MatrixBase::applyOnTheLeft(), internal::apply_rotation_in_the_plane()
293{
294 ColXpr x(this->col(p));
295 ColXpr y(this->col(q));
296 internal::apply_rotation_in_the_plane(x, y, j.transpose());
297}
Block< Derived, internal::traits< Derived >::RowsAtCompileTime, 1, !IsRowMajor > ColXpr
Definition BlockMethods.h:14

◆ array() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ArrayWrapper< MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::array ( )
inlineinherited
Returns
an Array expression of this matrix
See also
ArrayBase::matrix()
317{ return ArrayWrapper<Derived>(derived()); }

◆ array() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArrayWrapper< const MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::array ( ) const
inlineinherited
Returns
a const Array expression of this matrix
See also
ArrayBase::matrix()
320{ return ArrayWrapper<const Derived>(derived()); }

◆ asDiagonal()

const DiagonalWrapper< const MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::asDiagonal
inlineinherited
Returns
a pseudo-expression of a diagonal matrix with *this as vector of diagonal coefficients

\only_for_vectors

Example:

Output:

See also
class DiagonalWrapper, class DiagonalMatrix, diagonal(), isDiagonal()
278{
279 return DiagonalWrapper<const Derived>(derived());
280}

◆ asPermutation()

const PermutationWrapper< const MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::asPermutation
inherited
621{
622 return derived();
623}

◆ bdcSvd()

BDCSVD< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::bdcSvd ( unsigned int  computationOptions = 0) const
inlineinherited

\svd_module

Returns
the singular value decomposition of *this computed by Divide & Conquer algorithm
See also
class BDCSVD
1239{
1240 return BDCSVD<PlainObject>(*this, computationOptions);
1241}

◆ blueNorm()

NumTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar >::Real Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::blueNorm
inlineinherited
Returns
the l2 norm of *this using the Blue's algorithm. A Portable Fortran Program to Find the Euclidean Norm of a Vector, ACM TOMS, Vol 4, Issue 1, 1978.

For architecture/scalar types without vectorization, this version is much faster than stableNorm(). Otherwise the stableNorm() is faster.

See also
norm(), stableNorm(), hypotNorm()
203{
204 return internal::blueNorm_impl(*this);
205}

◆ coeffRef() [1/2]

template<typename ExpressionType >
EIGEN_DEVICE_FUNC const Scalar & Eigen::MatrixWrapper< ExpressionType >::coeffRef ( Index  index) const
inline
183 {
184 return m_expression.coeffRef(index);
185 }

References Eigen::MatrixWrapper< ExpressionType >::m_expression.

◆ coeffRef() [2/2]

template<typename ExpressionType >
EIGEN_DEVICE_FUNC const Scalar & Eigen::MatrixWrapper< ExpressionType >::coeffRef ( Index  rowId,
Index  colId 
) const
inline
177 {
178 return m_expression.derived().coeffRef(rowId, colId);
179 }

References Eigen::MatrixWrapper< ExpressionType >::m_expression.

◆ colPivHouseholderQr()

const ColPivHouseholderQR< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::colPivHouseholderQr
inlineinherited
Returns
the column-pivoting Householder QR decomposition of *this.
See also
class ColPivHouseholderQR
647{
648 return ColPivHouseholderQR<PlainObject>(eval());
649}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvalReturnType eval() const
Definition DenseBase.h:401

◆ cols()

template<typename ExpressionType >
EIGEN_DEVICE_FUNC Index Eigen::MatrixWrapper< ExpressionType >::cols ( ) const
inline
164{ return m_expression.cols(); }

References Eigen::MatrixWrapper< ExpressionType >::m_expression.

Referenced by Eigen::MatrixWrapper< ExpressionType >::resize().

+ Here is the caller graph for this function:

◆ colwise() [1/2]

template<typename Derived >
DenseBase< Derived >::ColwiseReturnType Eigen::DenseBase< Derived >::colwise
inlineinherited
Returns
a writable VectorwiseOp wrapper of *this providing additional partial reduction operations
See also
rowwise(), class VectorwiseOp, TutorialReductionsVisitorsBroadcasting
675{
676 return ColwiseReturnType(derived());
677}
VectorwiseOp< Derived, Vertical > ColwiseReturnType
Definition DenseBase.h:493

◆ colwise() [2/2]

template<typename Derived >
EIGEN_DEVICE_FUNC ConstColwiseReturnType Eigen::DenseBase< Derived >::colwise ( ) const
inlineinherited
Returns
a VectorwiseOp wrapper of *this providing additional partial reduction operations

Example:

Output:

See also
rowwise(), class VectorwiseOp, TutorialReductionsVisitorsBroadcasting
516 {
517 return ConstColwiseReturnType(derived());
518 }
const VectorwiseOp< const Derived, Vertical > ConstColwiseReturnType
Definition DenseBase.h:494

Referenced by igl::bounding_box(), igl::copyleft::offset_surface(), and Eigen::umeyama().

+ Here is the caller graph for this function:

◆ completeOrthogonalDecomposition()

const CompleteOrthogonalDecomposition< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::completeOrthogonalDecomposition
inlineinherited
Returns
the complete orthogonal decomposition of *this.
See also
class CompleteOrthogonalDecomposition
556 {
557 return CompleteOrthogonalDecomposition<PlainObject>(eval());
558}

◆ computeInverseAndDetWithCheck()

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::computeInverseAndDetWithCheck ( ResultType &  inverse,
typename ResultType::Scalar &  determinant,
bool &  invertible,
const RealScalar absDeterminantThreshold = NumTraits<Scalar>::dummy_precision() 
) const
inlineinherited

\lu_module

Computation of matrix inverse and determinant, with invertibility check.

This is only for fixed-size square matrices of size up to 4x4.

Parameters
inverseReference to the matrix in which to store the inverse.
determinantReference to the variable in which to store the determinant.
invertibleReference to the bool variable in which to store whether the matrix is invertible.
absDeterminantThresholdOptional parameter controlling the invertibility check. The matrix will be declared invertible if the absolute value of its determinant is greater than this threshold.

Example:

Output:

See also
inverse(), computeInverseWithCheck()
368{
369 // i'd love to put some static assertions there, but SFINAE means that they have no effect...
370 eigen_assert(rows() == cols());
371 // for 2x2, it's worth giving a chance to avoid evaluating.
372 // for larger sizes, evaluating has negligible cost and limits code size.
373 typedef typename internal::conditional<
375 typename internal::remove_all<typename internal::nested_eval<Derived, 2>::type>::type,
377 >::type MatrixType;
378 internal::compute_inverse_and_det_with_check<MatrixType, ResultType>::run
379 (derived(), absDeterminantThreshold, inverse, determinant, invertible);
380}
EIGEN_DEVICE_FUNC const InverseReturnType inverse() const
Definition ArrayCwiseUnaryOps.h:332
#define eigen_assert(x)
Definition Macros.h:579
Base::PlainObject PlainObject
Definition MatrixBase.h:103

◆ computeInverseWithCheck()

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::computeInverseWithCheck ( ResultType &  inverse,
bool &  invertible,
const RealScalar absDeterminantThreshold = NumTraits<Scalar>::dummy_precision() 
) const
inlineinherited

\lu_module

Computation of matrix inverse, with invertibility check.

This is only for fixed-size square matrices of size up to 4x4.

Parameters
inverseReference to the matrix in which to store the inverse.
invertibleReference to the bool variable in which to store whether the matrix is invertible.
absDeterminantThresholdOptional parameter controlling the invertibility check. The matrix will be declared invertible if the absolute value of its determinant is greater than this threshold.

Example:

Output:

See also
inverse(), computeInverseAndDetWithCheck()
406{
408 // i'd love to put some static assertions there, but SFINAE means that they have no effect...
409 eigen_assert(rows() == cols());
410 computeInverseAndDetWithCheck(inverse,determinant,invertible,absDeterminantThreshold);
411}
Scalar determinant() const
Definition Determinant.h:92
void computeInverseAndDetWithCheck(ResultType &inverse, typename ResultType::Scalar &determinant, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
Definition InverseImpl.h:362

◆ Constant() [1/3]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::ConstantReturnType Eigen::DenseBase< Derived >::Constant ( const Scalar value)
staticinherited
Returns
an expression of a constant matrix of value value

This variant is only for fixed-size DenseBase types. For dynamic-size types, you need to use the variants taking size arguments.

The template parameter CustomNullaryOp is the type of the functor.

See also
class CwiseNullaryOp
213{
215 return DenseBase<Derived>::NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_constant_op<Scalar>(value));
216}
#define EIGEN_STATIC_ASSERT_FIXED_SIZE(TYPE)
Definition StaticAssert.h:144
EIGEN_DEVICE_FUNC CoeffReturnType value() const
Definition DenseBase.h:480
static EIGEN_DEVICE_FUNC const CwiseNullaryOp< CustomNullaryOp, PlainObject > NullaryExpr(Index rows, Index cols, const CustomNullaryOp &func)

References EIGEN_STATIC_ASSERT_FIXED_SIZE, and Eigen::DenseBase< Derived >::NullaryExpr().

+ Here is the call graph for this function:

◆ Constant() [2/3]

template<typename Derived >
EIGEN_STRONG_INLINE const DenseBase< Derived >::ConstantReturnType Eigen::DenseBase< Derived >::Constant ( Index  rows,
Index  cols,
const Scalar value 
)
staticinherited
Returns
an expression of a constant matrix of value value

The parameters rows and cols are the number of rows and of columns of the returned matrix. Must be compatible with this DenseBase type.

This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass rows and cols as arguments, so Zero() should be used instead.

The template parameter CustomNullaryOp is the type of the functor.

See also
class CwiseNullaryOp
175{
176 return DenseBase<Derived>::NullaryExpr(rows, cols, internal::scalar_constant_op<Scalar>(value));
177}

References Eigen::DenseBase< Derived >::NullaryExpr().

+ Here is the call graph for this function:

◆ Constant() [3/3]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::ConstantReturnType Eigen::DenseBase< Derived >::Constant ( Index  size,
const Scalar value 
)
staticinherited
Returns
an expression of a constant matrix of value value

The parameter size is the size of the returned vector. Must be compatible with this DenseBase type.

\only_for_vectors

This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass size as argument, so Zero() should be used instead.

The template parameter CustomNullaryOp is the type of the functor.

See also
class CwiseNullaryOp
197{
198 return DenseBase<Derived>::NullaryExpr(size, internal::scalar_constant_op<Scalar>(value));
199}

References Eigen::DenseBase< Derived >::NullaryExpr().

+ Here is the call graph for this function:

◆ count()

template<typename Derived >
Eigen::Index Eigen::DenseBase< Derived >::count
inlineinherited
Returns
the number of coefficients which evaluate to true
See also
all(), any()
130{
131 return derived().template cast<bool>().template cast<Index>().sum();
132}

◆ cross() [1/2]

EIGEN_DEVICE_FUNC cross_product_return_type< OtherDerived >::type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::cross ( const MatrixBase< OtherDerived > &  other) const
inlineinherited

◆ cross() [2/2]

EIGEN_DEVICE_FUNC MatrixBase< MatrixWrapper< ExpressionType > >::template cross_product_return_type< OtherDerived >::type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::cross ( const MatrixBase< OtherDerived > &  other) const
inlineinherited

\geometry_module

Returns
the cross product of *this and other

Here is a very good explanation of cross-product: http://xkcd.com/199/

With complex numbers, the cross product is implemented as $ (\mathbf{a}+i\mathbf{b}) \times (\mathbf{c}+i\mathbf{d}) = (\mathbf{a} \times \mathbf{c} - \mathbf{b} \times \mathbf{d}) - i(\mathbf{a} \times \mathbf{d} - \mathbf{b} \times \mathbf{c})$

See also
MatrixBase::cross3()
35{
38
39 // Note that there is no need for an expression here since the compiler
40 // optimize such a small temporary very well (even within a complex expression)
41 typename internal::nested_eval<Derived,2>::type lhs(derived());
42 typename internal::nested_eval<OtherDerived,2>::type rhs(other.derived());
43 return typename cross_product_return_type<OtherDerived>::type(
44 numext::conj(lhs.coeff(1) * rhs.coeff(2) - lhs.coeff(2) * rhs.coeff(1)),
45 numext::conj(lhs.coeff(2) * rhs.coeff(0) - lhs.coeff(0) * rhs.coeff(2)),
46 numext::conj(lhs.coeff(0) * rhs.coeff(1) - lhs.coeff(1) * rhs.coeff(0))
47 );
48}
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
Definition StaticAssert.h:154

◆ cross3()

EIGEN_DEVICE_FUNC MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::cross3 ( const MatrixBase< OtherDerived > &  other) const
inlineinherited

\geometry_module

Returns
the cross product of *this and other using only the x, y, and z coefficients

The size of *this and other must be four. This function is especially useful when using 4D vectors instead of 3D ones to get advantage of SSE/AltiVec vectorization.

See also
MatrixBase::cross()
83{
86
87 typedef typename internal::nested_eval<Derived,2>::type DerivedNested;
88 typedef typename internal::nested_eval<OtherDerived,2>::type OtherDerivedNested;
89 DerivedNested lhs(derived());
90 OtherDerivedNested rhs(other.derived());
91
92 return internal::cross3_impl<Architecture::Target,
93 typename internal::remove_all<DerivedNested>::type,
94 typename internal::remove_all<OtherDerivedNested>::type>::run(lhs,rhs);
95}

◆ cwiseProduct()

EIGEN_STRONG_INLINE const SparseMatrixBase< OtherDerived >::template CwiseProductDenseReturnType< MatrixWrapper< ExpressionType > >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::cwiseProduct ( const SparseMatrixBase< OtherDerived > &  other) const
inlineinherited
440 {
441 return other.cwiseProduct(derived());
442 }

◆ data() [1/2]

template<typename ExpressionType >
EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvalue * Eigen::MatrixWrapper< ExpressionType >::data ( )
inline

◆ data() [2/2]

template<typename ExpressionType >
EIGEN_DEVICE_FUNC const Scalar * Eigen::MatrixWrapper< ExpressionType >::data ( ) const
inline

◆ determinant()

internal::traits< MatrixWrapper< ExpressionType > >::Scalar Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::determinant
inlineinherited

\lu_module

Returns
the determinant of this matrix
93{
94 eigen_assert(rows() == cols());
95 typedef typename internal::nested_eval<Derived,Base::RowsAtCompileTime>::type Nested;
96 return internal::determinant_impl<typename internal::remove_all<Nested>::type>::run(derived());
97}

◆ diagonal() [1/6]

MatrixBase< MatrixWrapper< ExpressionType > >::template DiagonalIndexReturnType< Index_ >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::diagonal
inlineinherited
Returns
an expression of the main diagonal of the matrix *this

*this is not required to be square.

Example:

Output:

See also
class Diagonal
Returns
an expression of the DiagIndex-th sub or super diagonal of the matrix *this

*this is not required to be square.

The template parameter DiagIndex represent a super diagonal if DiagIndex > 0 and a sub diagonal otherwise. DiagIndex == 0 is equivalent to the main diagonal.

Example:

Output:

See also
MatrixBase::diagonal(), class Diagonal
192{
193 return DiagonalReturnType(derived());
194}
Diagonal< MatrixWrapper< ExpressionType > > DiagonalReturnType
Definition MatrixBase.h:205

◆ diagonal() [2/6]

EIGEN_DEVICE_FUNC DiagonalIndexReturnType< Index >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::diagonal ( )
inherited

◆ diagonal() [3/6]

MatrixBase< MatrixWrapper< ExpressionType > >::template ConstDiagonalIndexReturnType< Index_ >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::diagonal
inlineinherited

This is the const version of diagonal().

This is the const version of diagonal<int>().

200{
201 return ConstDiagonalReturnType(derived());
202}
internal::add_const< Diagonal< constDerived > >::type ConstDiagonalReturnType
Definition MatrixBase.h:209

◆ diagonal() [4/6]

EIGEN_DEVICE_FUNC ConstDiagonalIndexReturnType< Index >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::diagonal ( ) const
inherited

◆ diagonal() [5/6]

MatrixBase< MatrixWrapper< ExpressionType > >::DiagonalDynamicIndexReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::diagonal ( Index  index)
inlineinherited
Returns
an expression of the DiagIndex-th sub or super diagonal of the matrix *this

*this is not required to be square.

The template parameter DiagIndex represent a super diagonal if DiagIndex > 0 and a sub diagonal otherwise. DiagIndex == 0 is equivalent to the main diagonal.

Example:

Output:

See also
MatrixBase::diagonal(), class Diagonal
218{
219 return DiagonalDynamicIndexReturnType(derived(), index);
220}
Diagonal< MatrixWrapper< ExpressionType >, DynamicIndex > DiagonalDynamicIndexReturnType
Definition MatrixBase.h:224

◆ diagonal() [6/6]

MatrixBase< MatrixWrapper< ExpressionType > >::ConstDiagonalDynamicIndexReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::diagonal ( Index  index) const
inlineinherited

This is the const version of diagonal(Index).

226{
227 return ConstDiagonalDynamicIndexReturnType(derived(), index);
228}
internal::add_const< Diagonal< constDerived, DynamicIndex > >::type ConstDiagonalDynamicIndexReturnType
Definition MatrixBase.h:225

◆ diagonalSize()

EIGEN_DEVICE_FUNC Index Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::diagonalSize ( ) const
inlineinherited
Returns
the size of the main diagonal, which is min(rows(),cols()).
See also
rows(), cols(), SizeAtCompileTime.
101{ return (numext::mini)(rows(),cols()); }

◆ dot() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScalarBinaryOpTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar, typenameinternal::traits< OtherDerived >::Scalar >::ReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::dot ( const MatrixBase< OtherDerived > &  other) const
inherited
73{
76 EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived)
77#if !(defined(EIGEN_NO_STATIC_ASSERT) && defined(EIGEN_NO_DEBUG))
78 typedef internal::scalar_conj_product_op<Scalar,typename OtherDerived::Scalar> func;
79 EIGEN_CHECK_BINARY_COMPATIBILIY(func,Scalar,typename OtherDerived::Scalar);
80#endif
81
82 eigen_assert(size() == other.size());
83
84 return internal::dot_nocheck<Derived,OtherDerived>::run(*this, other);
85}
#define EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(TYPE0, TYPE1)
Definition StaticAssert.h:164
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition StaticAssert.h:139
#define EIGEN_CHECK_BINARY_COMPATIBILIY(BINOP, LHS, RHS)
Definition XprHelper.h:815
constexpr auto size(const C &c) -> decltype(c.size())
Definition span.hpp:183

◆ dot() [2/2]

Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::dot ( const MatrixBase< OtherDerived > &  other) const
inherited
Returns
the dot product of *this with other.

\only_for_vectors

Note
If the scalar type is complex numbers, then this function returns the hermitian (sesquilinear) dot product, conjugate-linear in the first variable and linear in the second variable.
See also
squaredNorm(), norm()

◆ EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE()

typedef Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE ( ConstStartMinusOne  ,
Scalar  ,
quotient   
)
inherited

◆ eigenvalues()

MatrixBase< MatrixWrapper< ExpressionType > >::EigenvaluesReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::eigenvalues
inlineinherited

Computes the eigenvalues of a matrix.

Returns
Column vector containing the eigenvalues.

\eigenvalues_module This function computes the eigenvalues with the help of the EigenSolver class (for real matrices) or the ComplexEigenSolver class (for complex matrices).

The eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix.

The SelfAdjointView class provides a better algorithm for selfadjoint matrices.

Example:

Output:

See also
EigenSolver::eigenvalues(), ComplexEigenSolver::eigenvalues(), SelfAdjointView::eigenvalues()
68{
69 return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
70}

◆ eulerAngles()

EIGEN_DEVICE_FUNC Matrix< typename MatrixBase< MatrixWrapper< ExpressionType > >::Scalar, 3, 1 > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::eulerAngles ( Index  a0,
Index  a1,
Index  a2 
) const
inlineinherited

\geometry_module

Returns
the Euler-angles of the rotation matrix *this using the convention defined by the triplet (a0,a1,a2)

Each of the three parameters a0,a1,a2 represents the respective rotation axis as an integer in {0,1,2}. For instance, in:

Vector3f ea = mat.eulerAngles(2, 0, 2);

"2" represents the z axis and "0" the x axis, etc. The returned angles are such that we have the following equality:

mat == AngleAxisf(ea[0], Vector3f::UnitZ())
* AngleAxisf(ea[1], Vector3f::UnitX())
* AngleAxisf(ea[2], Vector3f::UnitZ());
AngleAxis< float > AngleAxisf
Definition AngleAxis.h:157

This corresponds to the right-multiply conventions (with right hand side frames).

The returned angles are in the ranges [0:pi]x[-pi:pi]x[-pi:pi].

See also
class AngleAxis
38{
39 EIGEN_USING_STD_MATH(atan2)
40 EIGEN_USING_STD_MATH(sin)
41 EIGEN_USING_STD_MATH(cos)
42 /* Implemented from Graphics Gems IV */
44
45 Matrix<Scalar,3,1> res;
46 typedef Matrix<typename Derived::Scalar,2,1> Vector2;
47
48 const Index odd = ((a0+1)%3 == a1) ? 0 : 1;
49 const Index i = a0;
50 const Index j = (a0 + 1 + odd)%3;
51 const Index k = (a0 + 2 - odd)%3;
52
53 if (a0==a2)
54 {
55 res[0] = atan2(coeff(j,i), coeff(k,i));
56 if((odd && res[0]<Scalar(0)) || ((!odd) && res[0]>Scalar(0)))
57 {
58 if(res[0] > Scalar(0)) {
59 res[0] -= Scalar(EIGEN_PI);
60 }
61 else {
62 res[0] += Scalar(EIGEN_PI);
63 }
64 Scalar s2 = Vector2(coeff(j,i), coeff(k,i)).norm();
65 res[1] = -atan2(s2, coeff(i,i));
66 }
67 else
68 {
69 Scalar s2 = Vector2(coeff(j,i), coeff(k,i)).norm();
70 res[1] = atan2(s2, coeff(i,i));
71 }
72
73 // With a=(0,1,0), we have i=0; j=1; k=2, and after computing the first two angles,
74 // we can compute their respective rotation, and apply its inverse to M. Since the result must
75 // be a rotation around x, we have:
76 //
77 // c2 s1.s2 c1.s2 1 0 0
78 // 0 c1 -s1 * M = 0 c3 s3
79 // -s2 s1.c2 c1.c2 0 -s3 c3
80 //
81 // Thus: m11.c1 - m21.s1 = c3 & m12.c1 - m22.s1 = s3
82
83 Scalar s1 = sin(res[0]);
84 Scalar c1 = cos(res[0]);
85 res[2] = atan2(c1*coeff(j,k)-s1*coeff(k,k), c1*coeff(j,j) - s1 * coeff(k,j));
86 }
87 else
88 {
89 res[0] = atan2(coeff(j,k), coeff(k,k));
90 Scalar c2 = Vector2(coeff(i,i), coeff(i,j)).norm();
91 if((odd && res[0]<Scalar(0)) || ((!odd) && res[0]>Scalar(0))) {
92 if(res[0] > Scalar(0)) {
93 res[0] -= Scalar(EIGEN_PI);
94 }
95 else {
96 res[0] += Scalar(EIGEN_PI);
97 }
98 res[1] = atan2(-coeff(i,k), -c2);
99 }
100 else
101 res[1] = atan2(-coeff(i,k), c2);
102 Scalar s1 = sin(res[0]);
103 Scalar c1 = cos(res[0]);
104 res[2] = atan2(s1*coeff(k,i)-c1*coeff(j,i), c1*coeff(j,j) - s1 * coeff(k,j));
105 }
106 if (!odd)
107 res = -res;
108
109 return res;
110}
EIGEN_DEVICE_FUNC const CosReturnType cos() const
Definition ArrayCwiseUnaryOps.h:202
EIGEN_DEVICE_FUNC const SinReturnType sin() const
Definition ArrayCwiseUnaryOps.h:220
#define EIGEN_PI
Definition MathFunctions.h:15
#define EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(TYPE, ROWS, COLS)
Definition StaticAssert.h:159
#define const
Definition getopt.c:38
if(!(yy_init))
Definition lexer.c:1190
typename Traits< remove_cvref_t< L > >::Scalar Scalar
Definition Line.hpp:36

◆ eval()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvalReturnType Eigen::DenseBase< MatrixWrapper< ExpressionType > >::eval ( ) const
inlineinherited
Returns
the matrix or vector obtained by evaluating this expression.

Notice that in the case of a plain matrix or vector (not an expression) this function just returns a const reference, in order to avoid a useless copy.

Warning
Be carefull with eval() and the auto C++ keyword, as detailed in this page .
402 {
403 // Even though MSVC does not honor strong inlining when the return type
404 // is a dynamic matrix, we desperately need strong inlining for fixed
405 // size types on MSVC.
406 return typename internal::eval<Derived>::type(derived());
407 }

◆ evalTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::DenseBase< Derived >::evalTo ( Dest &  ) const
inlineinherited
585 {
586 EIGEN_STATIC_ASSERT((internal::is_same<Dest,void>::value),THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS);
587 }
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition StaticAssert.h:124
@ value
Definition Meta.h:63

References EIGEN_STATIC_ASSERT.

◆ fill()

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::DenseBase< Derived >::fill ( const Scalar val)
inherited

Alias for setConstant(): sets all coefficients in this expression to val.

See also
setConstant(), Constant(), class CwiseNullaryOp
316{
317 setConstant(val);
318}
EIGEN_DEVICE_FUNC Derived & setConstant(const Scalar &value)
Definition CwiseNullaryOp.h:325

◆ flagged()

template<typename Derived >
template<unsigned int Added, unsigned int Removed>
EIGEN_DEPRECATED const Derived & Eigen::DenseBase< Derived >::flagged ( ) const
inlineinherited
313 { return derived(); }

◆ forceAlignedAccess() [1/2]

ForceAlignedAccess< MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::forceAlignedAccess
inlineinherited
Returns
an expression of *this with forced aligned access
See also
forceAlignedAccessIf(), class ForceAlignedAccess
304{ return derived(); }

◆ forceAlignedAccess() [2/2]

const ForceAlignedAccess< MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::forceAlignedAccess
inlineinherited
Returns
an expression of *this with forced aligned access
See also
forceAlignedAccessIf(),class ForceAlignedAccess
303{ return derived(); }

◆ forceAlignedAccessIf() [1/4]

internal::conditional< Enable, ForceAlignedAccess< MatrixWrapper< ExpressionType > >, MatrixWrapper< ExpressionType > & >::type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::forceAlignedAccessIf ( )
inlineinherited
Returns
an expression of *this with forced aligned access if Enable is true.
See also
forceAlignedAccess(), class ForceAlignedAccess
140{
141 return derived(); // FIXME This should not work but apparently is never used
142}

◆ forceAlignedAccessIf() [2/4]

MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::forceAlignedAccessIf ( )
inlineinherited
306{ return derived(); }

◆ forceAlignedAccessIf() [3/4]

internal::add_const_on_value_type< typenameinternal::conditional< Enable, ForceAlignedAccess< MatrixWrapper< ExpressionType > >, MatrixWrapper< ExpressionType > & >::type >::type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::forceAlignedAccessIf ( ) const
inlineinherited
Returns
an expression of *this with forced aligned access if Enable is true.
See also
forceAlignedAccess(), class ForceAlignedAccess
129{
130 return derived(); // FIXME This should not work but apparently is never used
131}

◆ forceAlignedAccessIf() [4/4]

const MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::forceAlignedAccessIf ( ) const
inlineinherited
305{ return derived(); }

◆ format()

template<typename Derived >
const WithFormat< Derived > Eigen::DenseBase< Derived >::format ( const IOFormat fmt) const
inlineinherited
Returns
a WithFormat proxy object allowing to print a matrix the with given format fmt.

See class IOFormat for some examples.

See also
class IOFormat, class WithFormat
474 {
475 return WithFormat<Derived>(derived(), fmt);
476 }

Referenced by igl::matlab_format(), and igl::writeOBJ().

+ Here is the caller graph for this function:

◆ fullPivHouseholderQr()

const FullPivHouseholderQR< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::fullPivHouseholderQr
inlineinherited
Returns
the full-pivoting Householder QR decomposition of *this.
See also
class FullPivHouseholderQR
670{
671 return FullPivHouseholderQR<PlainObject>(eval());
672}

◆ fullPivLu()

const FullPivLU< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::fullPivLu
inlineinherited

\lu_module

Returns
the full-pivoting LU decomposition of *this.
See also
class FullPivLU
885{
886 return FullPivLU<PlainObject>(eval());
887}

◆ hasNaN()

template<typename Derived >
bool Eigen::DenseBase< Derived >::hasNaN
inlineinherited
Returns
true is *this contains at least one Not A Number (NaN).
See also
allFinite()
140{
141#if EIGEN_COMP_MSVC || (defined __FAST_MATH__)
142 return derived().array().isNaN().any();
143#else
144 return !((derived().array()==derived().array()).all());
145#endif
146}
EIGEN_DEVICE_FUNC bool all() const
Definition BooleanRedux.h:81

◆ hnormalized()

EIGEN_DEVICE_FUNC const MatrixBase< MatrixWrapper< ExpressionType > >::HNormalizedReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::hnormalized
inlineinherited

homogeneous normalization

\geometry_module

Returns
a vector expression of the N-1 first coefficients of *this divided by that last coefficient.

This can be used to convert homogeneous coordinates to affine coordinates.

It is essentially a shortcut for:

this->head(this->size()-1)/this->coeff(this->size()-1);
EIGEN_DEVICE_FUNC SegmentReturnType head(Index n)
This is the const version of head(Index).
Definition BlockMethods.h:919

Example:

Output:

See also
VectorwiseOp::hnormalized()
173{
175 return ConstStartMinusOne(derived(),0,0,
176 ColsAtCompileTime==1?size()-1:1,
177 ColsAtCompileTime==1?1:size()-1) / coeff(size()-1);
178}
Block< const MatrixWrapper< ExpressionType >, internal::traits< MatrixWrapper< ExpressionType > >::ColsAtCompileTime==1 ? SizeMinusOne :1, internal::traits< MatrixWrapper< ExpressionType > >::ColsAtCompileTime==1 ? 1 :SizeMinusOne > ConstStartMinusOne
Definition MatrixBase.h:408

◆ homogeneous()

EIGEN_DEVICE_FUNC MatrixBase< MatrixWrapper< ExpressionType > >::HomogeneousReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::homogeneous
inlineinherited

\geometry_module

Returns
a vector expression that is one longer than the vector argument, with the value 1 symbolically appended as the last coefficient.

This can be used to convert affine coordinates to homogeneous coordinates.

\only_for_vectors

Example:

Output:

See also
VectorwiseOp::homogeneous(), class Homogeneous
131{
133 return HomogeneousReturnType(derived());
134}
Homogeneous< MatrixWrapper< ExpressionType >, HomogeneousReturnTypeDirection > HomogeneousReturnType
Definition MatrixBase.h:399

◆ householderQr()

const HouseholderQR< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::householderQr
inlineinherited
Returns
the Householder QR decomposition of *this.
See also
class HouseholderQR
403{
404 return HouseholderQR<PlainObject>(eval());
405}

◆ hypotNorm()

NumTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar >::Real Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::hypotNorm
inlineinherited
Returns
the l2 norm of *this avoiding undeflow and overflow. This version use a concatenation of hypot() calls, and it is very slow.
See also
norm(), stableNorm()
215{
216 return this->cwiseAbs().redux(internal::scalar_hypot_op<RealScalar>());
217}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseAbsReturnType cwiseAbs() const
Definition MatrixCwiseUnaryOps.h:32

◆ Identity() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::IdentityReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::Identity
staticinherited
Returns
an expression of the identity matrix (not necessarily square).

This variant is only for fixed-size MatrixBase types. For dynamic-size types, you need to use the variant taking size arguments.

Example:

Output:

See also
Identity(Index,Index), setIdentity(), isIdentity()
701{
703 return MatrixBase<Derived>::NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_identity_op<Scalar>());
704}

◆ Identity() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::IdentityReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::Identity ( Index  rows,
Index  cols 
)
staticinherited
Returns
an expression of the identity matrix (not necessarily square).

The parameters rows and cols are the number of rows and of columns of the returned matrix. Must be compatible with this MatrixBase type.

This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass rows and cols as arguments, so Identity() should be used instead.

Example:

Output:

See also
Identity(), setIdentity(), isIdentity()
684{
685 return DenseBase<Derived>::NullaryExpr(rows, cols, internal::scalar_identity_op<Scalar>());
686}

◆ innerSize()

template<typename Derived >
EIGEN_DEVICE_FUNC Index Eigen::DenseBase< Derived >::innerSize ( ) const
inlineinherited
Returns
the inner size.
Note
For a vector, this is just the size. For a matrix (non-vector), this is the minor dimension with respect to the storage order, i.e., the number of rows for a column-major matrix, and the number of columns for a row-major matrix.
231 {
232 return IsVectorAtCompileTime ? this->size()
233 : int(IsRowMajor) ? this->cols() : this->rows();
234 }

References Eigen::DenseBase< Derived >::IsRowMajor, and Eigen::DenseBase< Derived >::IsVectorAtCompileTime.

◆ innerStride()

template<typename ExpressionType >
EIGEN_DEVICE_FUNC Index Eigen::MatrixWrapper< ExpressionType >::innerStride ( ) const
inline
168{ return m_expression.innerStride(); }

References Eigen::MatrixWrapper< ExpressionType >::m_expression.

◆ inverse()

const Inverse< MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::inverse
inlineinherited

\lu_module

Returns
the matrix inverse of this matrix.

For small fixed sizes up to 4x4, this method uses cofactors. In the general case, this method uses class PartialPivLU.

Note
This matrix must be invertible, otherwise the result is undefined. If you need an invertibility check, do the following: Example:
Output:
See also
computeInverseAndDetWithCheck()
336{
337 EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsInteger,THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES)
338 eigen_assert(rows() == cols());
339 return Inverse<Derived>(derived());
340}

◆ isApprox() [1/2]

template<typename Derived >
template<typename OtherDerived >
bool Eigen::DenseBase< Derived >::isApprox ( const DenseBase< OtherDerived > &  other,
const RealScalar prec 
) const
inherited
Returns
true if *this is approximately equal to other, within the precision determined by prec.
Note
The fuzzy compares are done multiplicatively. Two vectors $ v $ and $ w $ are considered to be approximately equal within precision $ p $ if

\[ \Vert v - w \Vert \leqslant p\,\min(\Vert v\Vert, \Vert w\Vert). \]

For matrices, the comparison is done using the Hilbert-Schmidt norm (aka Frobenius norm L2 norm).
Because of the multiplicativeness of this comparison, one can't use this function to check whether *this is approximately equal to the zero matrix or vector. Indeed, isApprox(zero) returns false unless *this itself is exactly the zero matrix or vector. If you want to test whether *this is zero, use internal::isMuchSmallerThan(const RealScalar&, RealScalar) instead.
See also
internal::isMuchSmallerThan(const RealScalar&, RealScalar) const
107{
108 return internal::isApprox_selector<Derived, OtherDerived>::run(derived(), other.derived(), prec);
109}
static EIGEN_DEVICE_FUNC bool run(const Derived &x, const OtherDerived &y, const typename Derived::RealScalar &prec)
Definition Fuzzy.h:23

References Eigen::internal::isApprox_selector< Derived, OtherDerived, is_integer >::run().

+ Here is the call graph for this function:

◆ isApprox() [2/2]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC bool Eigen::DenseBase< Derived >::isApprox ( const DenseBase< OtherDerived > &  other,
const RealScalar prec = NumTraitsScalar >::dummy_precision() 
) const
inherited

◆ isApproxToConstant()

template<typename Derived >
EIGEN_DEVICE_FUNC bool Eigen::DenseBase< Derived >::isApproxToConstant ( const Scalar val,
const RealScalar prec = NumTraits<Scalar>::dummy_precision() 
) const
inherited
Returns
true if all coefficients in this matrix are approximately equal to val, to within precision prec
291{
292 typename internal::nested_eval<Derived,1>::type self(derived());
293 for(Index j = 0; j < cols(); ++j)
294 for(Index i = 0; i < rows(); ++i)
295 if(!internal::isApprox(self.coeff(i, j), val, prec))
296 return false;
297 return true;
298}
EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition MathFunctions.h:1361
conditional< Evaluate, PlainObject, typenameref_selector< T >::type >::type type
Definition XprHelper.h:452

References Eigen::internal::isApprox().

+ Here is the call graph for this function:

◆ isConstant()

template<typename Derived >
EIGEN_DEVICE_FUNC bool Eigen::DenseBase< Derived >::isConstant ( const Scalar val,
const RealScalar prec = NumTraits<Scalar>::dummy_precision() 
) const
inherited

This is just an alias for isApproxToConstant().

Returns
true if all coefficients in this matrix are approximately equal to value, to within precision prec
306{
307 return isApproxToConstant(val, prec);
308}
EIGEN_DEVICE_FUNC bool isApproxToConstant(const Scalar &value, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition CwiseNullaryOp.h:290

◆ isDiagonal()

bool Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::isDiagonal ( const RealScalar prec = NumTraits<Scalar>::dummy_precision()) const
inherited
Returns
true if *this is approximately equal to a diagonal matrix, within the precision given by prec.

Example:

Output:

See also
asDiagonal()
292{
293 if(cols() != rows()) return false;
294 RealScalar maxAbsOnDiagonal = static_cast<RealScalar>(-1);
295 for(Index j = 0; j < cols(); ++j)
296 {
297 RealScalar absOnDiagonal = numext::abs(coeff(j,j));
298 if(absOnDiagonal > maxAbsOnDiagonal) maxAbsOnDiagonal = absOnDiagonal;
299 }
300 for(Index j = 0; j < cols(); ++j)
301 for(Index i = 0; i < j; ++i)
302 {
303 if(!internal::isMuchSmallerThan(coeff(i, j), maxAbsOnDiagonal, prec)) return false;
304 if(!internal::isMuchSmallerThan(coeff(j, i), maxAbsOnDiagonal, prec)) return false;
305 }
306 return true;
307}
NumTraits< Scalar >::Real RealScalar
Definition MatrixBase.h:58

◆ isIdentity()

bool Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::isIdentity ( const RealScalar prec = NumTraits<Scalar>::dummy_precision()) const
inherited
Returns
true if *this is approximately equal to the identity matrix (not necessarily square), within the precision given by prec.

Example:

Output:

See also
class CwiseNullaryOp, Identity(), Identity(Index,Index), setIdentity()
718{
719 typename internal::nested_eval<Derived,1>::type self(derived());
720 for(Index j = 0; j < cols(); ++j)
721 {
722 for(Index i = 0; i < rows(); ++i)
723 {
724 if(i == j)
725 {
726 if(!internal::isApprox(self.coeff(i, j), static_cast<Scalar>(1), prec))
727 return false;
728 }
729 else
730 {
731 if(!internal::isMuchSmallerThan(self.coeff(i, j), static_cast<RealScalar>(1), prec))
732 return false;
733 }
734 }
735 }
736 return true;
737}

◆ isLowerTriangular()

bool Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::isLowerTriangular ( const RealScalar prec = NumTraits<Scalar>::dummy_precision()) const
inherited
Returns
true if *this is approximately equal to a lower triangular matrix, within the precision given by prec.
See also
isUpperTriangular()
674{
675 RealScalar maxAbsOnLowerPart = static_cast<RealScalar>(-1);
676 for(Index j = 0; j < cols(); ++j)
677 for(Index i = j; i < rows(); ++i)
678 {
679 RealScalar absValue = numext::abs(coeff(i,j));
680 if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
681 }
682 RealScalar threshold = maxAbsOnLowerPart * prec;
683 for(Index j = 1; j < cols(); ++j)
684 {
685 Index maxi = numext::mini(j, rows()-1);
686 for(Index i = 0; i < maxi; ++i)
687 if(numext::abs(coeff(i, j)) > threshold) return false;
688 }
689 return true;
690}
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Definition MathFunctions.h:823

◆ isMuchSmallerThan() [1/4]

template<typename Derived >
template<typename OtherDerived >
bool Eigen::DenseBase< Derived >::isMuchSmallerThan ( const DenseBase< OtherDerived > &  other,
const RealScalar prec 
) const
inherited
Returns
true if the norm of *this is much smaller than the norm of other, within the precision determined by prec.
Note
The fuzzy compares are done multiplicatively. A vector $ v $ is considered to be much smaller than a vector $ w $ within precision $ p $ if

\[ \Vert v \Vert \leqslant p\,\Vert w\Vert. \]

For matrices, the comparison is done using the Hilbert-Schmidt norm.
See also
isApprox(), isMuchSmallerThan(const RealScalar&, RealScalar) const
149{
151}
static EIGEN_DEVICE_FUNC bool run(const Derived &x, const OtherDerived &y, const typename Derived::RealScalar &prec)
Definition Fuzzy.h:45

References Eigen::internal::isMuchSmallerThan_object_selector< Derived, OtherDerived, is_integer >::run().

+ Here is the call graph for this function:

◆ isMuchSmallerThan() [2/4]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC bool Eigen::DenseBase< Derived >::isMuchSmallerThan ( const DenseBase< OtherDerived > &  other,
const RealScalar prec = NumTraitsScalar >::dummy_precision() 
) const
inherited

◆ isMuchSmallerThan() [3/4]

template<typename Derived >
EIGEN_DEVICE_FUNC bool Eigen::DenseBase< Derived >::isMuchSmallerThan ( const RealScalar other,
const RealScalar prec = NumTraitsScalar >::dummy_precision() 
) const
inherited

◆ isMuchSmallerThan() [4/4]

template<typename Derived >
template<typename Derived >
bool Eigen::DenseBase< Derived >::isMuchSmallerThan ( const typename NumTraits< Scalar >::Real &  other,
const RealScalar prec 
) const
inherited
Returns
true if the norm of *this is much smaller than other, within the precision determined by prec.
Note
The fuzzy compares are done multiplicatively. A vector $ v $ is considered to be much smaller than $ x $ within precision $ p $ if

\[ \Vert v \Vert \leqslant p\,\vert x\vert. \]

For matrices, the comparison is done using the Hilbert-Schmidt norm. For this reason, the value of the reference scalar other should come from the Hilbert-Schmidt norm of a reference matrix of same dimensions.

See also
isApprox(), isMuchSmallerThan(const DenseBase<OtherDerived>&, RealScalar) const
129{
131}
static EIGEN_DEVICE_FUNC bool run(const Derived &x, const typename Derived::RealScalar &y, const typename Derived::RealScalar &prec)
Definition Fuzzy.h:65

References Eigen::internal::isMuchSmallerThan_scalar_selector< Derived, is_integer >::run().

+ Here is the call graph for this function:

◆ isOnes()

template<typename Derived >
EIGEN_DEVICE_FUNC bool Eigen::DenseBase< Derived >::isOnes ( const RealScalar prec = NumTraits<Scalar>::dummy_precision()) const
inherited
Returns
true if *this is approximately equal to the matrix where all coefficients are equal to 1, within the precision given by prec.

Example:

Output:

See also
class CwiseNullaryOp, Ones()
613{
614 return isApproxToConstant(Scalar(1), prec);
615}
internal::traits< Derived >::Scalar Scalar
Definition DenseBase.h:66

◆ isOrthogonal()

bool Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::isOrthogonal ( const MatrixBase< OtherDerived > &  other,
const RealScalar prec = NumTraits<Scalar>::dummy_precision() 
) const
inherited
Returns
true if *this is approximately orthogonal to other, within the precision given by prec.

Example:

Output:

 
284{
285 typename internal::nested_eval<Derived,2>::type nested(derived());
286 typename internal::nested_eval<OtherDerived,2>::type otherNested(other.derived());
287 return numext::abs2(nested.dot(otherNested)) <= prec * prec * nested.squaredNorm() * otherNested.squaredNorm();
288}

◆ isUnitary()

bool Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::isUnitary ( const RealScalar prec = NumTraits<Scalar>::dummy_precision()) const
inherited
Returns
true if *this is approximately an unitary matrix, within the precision given by prec. In the case where the Scalar type is real numbers, a unitary matrix is an orthogonal matrix, whence the name.
Note
This can be used to check whether a family of vectors forms an orthonormal basis. Indeed, m.isUnitary() returns true if and only if the columns (equivalently, the rows) of m form an orthonormal basis.

Example:

Output:

 
303{
304 typename internal::nested_eval<Derived,1>::type self(derived());
305 for(Index i = 0; i < cols(); ++i)
306 {
307 if(!internal::isApprox(self.col(i).squaredNorm(), static_cast<RealScalar>(1), prec))
308 return false;
309 for(Index j = 0; j < i; ++j)
310 if(!internal::isMuchSmallerThan(self.col(i).dot(self.col(j)), static_cast<Scalar>(1), prec))
311 return false;
312 }
313 return true;
314}
EIGEN_DEVICE_FUNC ScalarBinaryOpTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar, typenameinternal::traits< OtherDerived >::Scalar >::ReturnType dot(const MatrixBase< OtherDerived > &other) const
EIGEN_DEVICE_FUNC RealScalar squaredNorm() const
Definition Dot.h:96

◆ isUpperTriangular()

bool Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::isUpperTriangular ( const RealScalar prec = NumTraits<Scalar>::dummy_precision()) const
inherited
Returns
true if *this is approximately equal to an upper triangular matrix, within the precision given by prec.
See also
isLowerTriangular()
649{
650 RealScalar maxAbsOnUpperPart = static_cast<RealScalar>(-1);
651 for(Index j = 0; j < cols(); ++j)
652 {
653 Index maxi = numext::mini(j, rows()-1);
654 for(Index i = 0; i <= maxi; ++i)
655 {
656 RealScalar absValue = numext::abs(coeff(i,j));
657 if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
658 }
659 }
660 RealScalar threshold = maxAbsOnUpperPart * prec;
661 for(Index j = 0; j < cols(); ++j)
662 for(Index i = j+1; i < rows(); ++i)
663 if(numext::abs(coeff(i, j)) > threshold) return false;
664 return true;
665}

◆ isZero()

template<typename Derived >
EIGEN_DEVICE_FUNC bool Eigen::DenseBase< Derived >::isZero ( const RealScalar prec = NumTraits<Scalar>::dummy_precision()) const
inherited
Returns
true if *this is approximately equal to the zero matrix, within the precision given by prec.

Example:

Output:

See also
class CwiseNullaryOp, Zero()
482{
483 typename internal::nested_eval<Derived,1>::type self(derived());
484 for(Index j = 0; j < cols(); ++j)
485 for(Index i = 0; i < rows(); ++i)
486 if(!internal::isMuchSmallerThan(self.coeff(i, j), static_cast<Scalar>(1), prec))
487 return false;
488 return true;
489}
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition MathFunctions.h:1354

References Eigen::internal::isMuchSmallerThan().

+ Here is the call graph for this function:

◆ jacobiSvd()

JacobiSVD< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::jacobiSvd ( unsigned int  computationOptions = 0) const
inlineinherited

\svd_module

Returns
the singular value decomposition of *this computed by two-sided Jacobi transformations.
See also
class JacobiSVD
798{
799 return JacobiSVD<PlainObject>(*this, computationOptions);
800}

◆ lazyAssign() [1/2]

EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & Eigen::DenseBase< MatrixWrapper< ExpressionType > >::lazyAssign ( const DenseBase< OtherDerived > &  other)
inherited
21{
22 enum{
23 SameType = internal::is_same<typename Derived::Scalar,typename OtherDerived::Scalar>::value
24 };
25
27 EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived)
28 EIGEN_STATIC_ASSERT(SameType,YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
29
30 eigen_assert(rows() == other.rows() && cols() == other.cols());
31 internal::call_assignment_no_alias(derived(),other.derived());
32
33 return derived();
34}
#define EIGEN_STATIC_ASSERT_LVALUE(Derived)
Definition StaticAssert.h:199
#define EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(TYPE0, TYPE1)
Definition StaticAssert.h:189

◆ lazyAssign() [2/2]

EIGEN_DEVICE_FUNC MatrixWrapper< ExpressionType > & Eigen::DenseBase< MatrixWrapper< ExpressionType > >::lazyAssign ( const DenseBase< OtherDerived > &  other)
inherited

◆ lazyProduct() [1/2]

const Product< MatrixWrapper< ExpressionType > , OtherDerived, LazyProduct > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::lazyProduct ( const MatrixBase< OtherDerived > &  other) const
inherited
Returns
an expression of the matrix product of *this and other without implicit evaluation.

The returned product will behave like any other expressions: the coefficients of the product will be computed once at a time as requested. This might be useful in some extremely rare cases when only a small and no coherent fraction of the result's coefficients have to be computed.

Warning
This version of the matrix product can be much much slower. So use it only if you know what you are doing and that you measured a true speed improvement.
See also
operator*(const MatrixBase&)
433{
434 enum {
435 ProductIsValid = Derived::ColsAtCompileTime==Dynamic
436 || OtherDerived::RowsAtCompileTime==Dynamic
437 || int(Derived::ColsAtCompileTime)==int(OtherDerived::RowsAtCompileTime),
438 AreVectors = Derived::IsVectorAtCompileTime && OtherDerived::IsVectorAtCompileTime,
439 SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(Derived,OtherDerived)
440 };
441 // note to the lost user:
442 // * for a dot product use: v1.dot(v2)
443 // * for a coeff-wise product use: v1.cwiseProduct(v2)
444 EIGEN_STATIC_ASSERT(ProductIsValid || !(AreVectors && SameSizes),
445 INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)
446 EIGEN_STATIC_ASSERT(ProductIsValid || !(SameSizes && !AreVectors),
447 INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)
448 EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)
449
450 return Product<Derived,OtherDerived,LazyProduct>(derived(), other.derived());
451}
#define EIGEN_PREDICATE_SAME_MATRIX_SIZE(TYPE0, TYPE1)
Definition StaticAssert.h:171

◆ lazyProduct() [2/2]

EIGEN_DEVICE_FUNC const Product< MatrixWrapper< ExpressionType > , OtherDerived, LazyProduct > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::lazyProduct ( const MatrixBase< OtherDerived > &  other) const
inherited

◆ ldlt()

const LDLT< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::ldlt
inlineinherited

\cholesky_module

Returns
the Cholesky decomposition with full pivoting without square root of *this
See also
SelfAdjointView::ldlt()
667{
668 return LDLT<PlainObject>(derived());
669}

◆ LinSpaced() [1/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::RandomAccessLinSpacedReturnType Eigen::DenseBase< Derived >::LinSpaced ( const Scalar low,
const Scalar high 
)
staticinherited

Special version for fixed size types which does not require the size parameter.

281{
284 return DenseBase<Derived>::NullaryExpr(Derived::SizeAtCompileTime, internal::linspaced_op<Scalar,PacketScalar>(low,high,Derived::SizeAtCompileTime));
285}

References EIGEN_STATIC_ASSERT_FIXED_SIZE, EIGEN_STATIC_ASSERT_VECTOR_ONLY, and Eigen::DenseBase< Derived >::NullaryExpr().

+ Here is the call graph for this function:

◆ LinSpaced() [2/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::RandomAccessLinSpacedReturnType Eigen::DenseBase< Derived >::LinSpaced ( Index  size,
const Scalar low,
const Scalar high 
)
staticinherited

Sets a linearly spaced vector.

The function generates 'size' equally spaced values in the closed interval [low,high]. When size is set to 1, a vector of length 1 containing 'high' is returned.

\only_for_vectors

Example:

Output:

For integer scalar types, an even spacing is possible if and only if the length of the range, i.e., high-low is a scalar multiple of size-1, or if size is a scalar multiple of the number of values high-low+1 (meaning each value can be repeated the same number of time). If one of these two considions is not satisfied, then high is lowered to the largest value satisfying one of this constraint. Here are some examples:

Example:

Output:

See also
setLinSpaced(Index,const Scalar&,const Scalar&), CwiseNullaryOp
269{
271 return DenseBase<Derived>::NullaryExpr(size, internal::linspaced_op<Scalar,PacketScalar>(low,high,size));
272}

◆ LinSpaced() [3/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::RandomAccessLinSpacedReturnType Eigen::DenseBase< Derived >::LinSpaced ( Sequential_t  ,
const Scalar low,
const Scalar high 
)
staticinherited
See also
LinSpaced(Scalar,Scalar)
237{
240 return DenseBase<Derived>::NullaryExpr(Derived::SizeAtCompileTime, internal::linspaced_op<Scalar,PacketScalar>(low,high,Derived::SizeAtCompileTime));
241}

References EIGEN_STATIC_ASSERT_FIXED_SIZE, EIGEN_STATIC_ASSERT_VECTOR_ONLY, and Eigen::DenseBase< Derived >::NullaryExpr().

+ Here is the call graph for this function:

◆ LinSpaced() [4/4]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::RandomAccessLinSpacedReturnType Eigen::DenseBase< Derived >::LinSpaced ( Sequential_t  ,
Index  size,
const Scalar low,
const Scalar high 
)
staticinherited
See also
LinSpaced(Index,Scalar,Scalar), setLinSpaced(Index,const Scalar&,const Scalar&)
225{
227 return DenseBase<Derived>::NullaryExpr(size, internal::linspaced_op<Scalar,PacketScalar>(low,high,size));
228}

References EIGEN_STATIC_ASSERT_VECTOR_ONLY, and Eigen::DenseBase< Derived >::NullaryExpr().

+ Here is the call graph for this function:

◆ llt()

const LLT< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::llt
inlineinherited

\cholesky_module

Returns
the LLT decomposition of *this
See also
SelfAdjointView::llt()
525{
526 return LLT<PlainObject>(derived());
527}

◆ lpNorm() [1/2]

NumTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar >::Real Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::lpNorm ( ) const
inlineinherited
Returns
the coefficient-wise $ \ell^p $ norm of *this, that is, returns the p-th root of the sum of the p-th powers of the absolute values of the coefficients of *this. If p is the special value Eigen::Infinity, this function returns the $ \ell^\infty $ norm, that is the maximum of the absolute values of the coefficients of *this.

In all cases, if *this is empty, then the value 0 is returned.

Note
For matrices, this function does not compute the operator-norm. That is, if *this is a matrix, then its coefficients are interpreted as a 1D vector. Nonetheless, you can easily compute the 1-norm and $\infty$-norm matrix operator norms using partial reductions .
See also
norm()
268{
269 return internal::lpNorm_selector<Derived, p>::run(*this);
270}

◆ lpNorm() [2/2]

EIGEN_DEVICE_FUNC RealScalar Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::lpNorm ( ) const
inherited

◆ lu()

const PartialPivLU< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::lu
inlineinherited

\lu_module

Synonym of partialPivLu().

Returns
the partial-pivoting LU decomposition of *this.
See also
class PartialPivLU
605{
606 return PartialPivLU<PlainObject>(eval());
607}

◆ makeHouseholder()

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::makeHouseholder ( EssentialPart &  essential,
Scalar tau,
RealScalar beta 
) const
inherited

Computes the elementary reflector H such that: $ H *this = [ beta 0 ... 0]^T $ where the transformation H is: $ H = I - tau v v^*$ and the vector v is: $ v^T = [1 essential^T] $

On output:

Parameters
essentialthe essential part of the vector v
tauthe scaling factor of the Householder transformation
betathe result of H * *this
See also
MatrixBase::makeHouseholderInPlace(), MatrixBase::applyHouseholderOnTheLeft(), MatrixBase::applyHouseholderOnTheRight()
69{
70 using std::sqrt;
71 using numext::conj;
72
74 VectorBlock<const Derived, EssentialPart::SizeAtCompileTime> tail(derived(), 1, size()-1);
75
76 RealScalar tailSqNorm = size()==1 ? RealScalar(0) : tail.squaredNorm();
77 Scalar c0 = coeff(0);
78 const RealScalar tol = (std::numeric_limits<RealScalar>::min)();
79
80 if(tailSqNorm <= tol && numext::abs2(numext::imag(c0))<=tol)
81 {
82 tau = RealScalar(0);
83 beta = numext::real(c0);
84 essential.setZero();
85 }
86 else
87 {
88 beta = sqrt(numext::abs2(c0) + tailSqNorm);
89 if (numext::real(c0)>=RealScalar(0))
90 beta = -beta;
91 essential = tail / (c0 - beta);
92 tau = conj((beta - c0) / beta);
93 }
94}
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Definition ArrayCwiseUnaryOps.h:152
EIGEN_DEVICE_FUNC SegmentReturnType tail(Index n)
This is the const version of tail(Index).
Definition BlockMethods.h:949

◆ makeHouseholderInPlace()

void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::makeHouseholderInPlace ( Scalar tau,
RealScalar beta 
)
inherited

Computes the elementary reflector H such that: $ H *this = [ beta 0 ... 0]^T $ where the transformation H is: $ H = I - tau v v^*$ and the vector v is: $ v^T = [1 essential^T] $

The essential part of the vector v is stored in *this.

On output:

Parameters
tauthe scaling factor of the Householder transformation
betathe result of H * *this
See also
MatrixBase::makeHouseholder(), MatrixBase::applyHouseholderOnTheLeft(), MatrixBase::applyHouseholderOnTheRight()
43{
44 VectorBlock<Derived, internal::decrement_size<Base::SizeAtCompileTime>::ret> essentialPart(derived(), 1, size()-1);
45 makeHouseholder(essentialPart, tau, beta);
46}
void makeHouseholder(EssentialPart &essential, Scalar &tau, RealScalar &beta) const
Definition Householder.h:65

◆ matrix() [1/2]

EIGEN_DEVICE_FUNC MatrixBase< MatrixWrapper< ExpressionType > > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::matrix ( )
inlineinherited
312{ return *this; }

◆ matrix() [2/2]

EIGEN_DEVICE_FUNC const MatrixBase< MatrixWrapper< ExpressionType > > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::matrix ( ) const
inlineinherited
313{ return *this; }

◆ matrixFunction()

const MatrixFunctionReturnValue< MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::matrixFunction ( StemFunction  f) const
inherited

Helper function for the unsupported MatrixFunctions module.

◆ maxCoeff() [1/3]

template<typename Derived >
EIGEN_STRONG_INLINE internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::maxCoeff
inherited
Returns
the maximum of all coefficients of *this.
Warning
the result is undefined if *this contains NaN.
437{
438 return derived().redux(Eigen::internal::scalar_max_op<Scalar,Scalar>());
439}
Definition BinaryFunctors.h:167

Referenced by igl::copyleft::cgal::half_space_box(), igl::isolines(), igl::min_quad_with_fixed_precompute(), igl::octree(), Eigen::internal::lpNorm_selector< Derived, Infinity >::run(), and igl::slice().

+ Here is the caller graph for this function:

◆ maxCoeff() [2/3]

template<typename Derived >
template<typename IndexType >
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::maxCoeff ( IndexType *  index) const
inherited
Returns
the maximum of all coefficients of *this and puts in *index its location.
Warning
the result is undefined if *this contains NaN.
See also
DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::maxCoeff()
263{
265 internal::max_coeff_visitor<Derived> maxVisitor;
266 this->visit(maxVisitor);
267 *index = (RowsAtCompileTime==1) ? maxVisitor.col : maxVisitor.row;
268 return maxVisitor.res;
269}
EIGEN_DEVICE_FUNC void visit(Visitor &func) const
Definition Visitor.h:107

References Eigen::internal::coeff_visitor< Derived >::col, EIGEN_STATIC_ASSERT_VECTOR_ONLY, Eigen::internal::coeff_visitor< Derived >::res, and Eigen::internal::coeff_visitor< Derived >::row.

◆ maxCoeff() [3/3]

template<typename Derived >
template<typename IndexType >
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::maxCoeff ( IndexType *  rowId,
IndexType *  colId 
) const
inherited
Returns
the maximum of all coefficients of *this and puts in *row and *col its location.
Warning
the result is undefined if *this contains NaN.
See also
DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visit(), DenseBase::maxCoeff()
245{
246 internal::max_coeff_visitor<Derived> maxVisitor;
247 this->visit(maxVisitor);
248 *rowPtr = maxVisitor.row;
249 if (colPtr) *colPtr = maxVisitor.col;
250 return maxVisitor.res;
251}

References Eigen::internal::coeff_visitor< Derived >::col, Eigen::internal::coeff_visitor< Derived >::res, and Eigen::internal::coeff_visitor< Derived >::row.

◆ mean()

template<typename Derived >
EIGEN_STRONG_INLINE internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::mean
inherited
Returns
the mean of all coefficients of *this
See also
trace(), prod(), sum()
463{
464#ifdef __INTEL_COMPILER
465 #pragma warning push
466 #pragma warning ( disable : 2259 )
467#endif
469#ifdef __INTEL_COMPILER
470 #pragma warning pop
471#endif
472}
EIGEN_DEVICE_FUNC Scalar redux(const BinaryOp &func) const
Definition BinaryFunctors.h:33

◆ minCoeff() [1/3]

template<typename Derived >
EIGEN_STRONG_INLINE internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::minCoeff
inherited
Returns
the minimum of all coefficients of *this.
Warning
the result is undefined if *this contains NaN.
427{
428 return derived().redux(Eigen::internal::scalar_min_op<Scalar,Scalar>());
429}
Definition BinaryFunctors.h:141

Referenced by igl::copyleft::cgal::half_space_box(), igl::isolines(), igl::min_quad_with_fixed_precompute(), igl::octree(), and igl::slice().

+ Here is the caller graph for this function:

◆ minCoeff() [2/3]

template<typename Derived >
template<typename IndexType >
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::minCoeff ( IndexType *  index) const
inherited
Returns
the minimum of all coefficients of *this and puts in *index its location.
Warning
the result is undefined if *this contains NaN.
See also
DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::visit(), DenseBase::minCoeff()
226{
228 internal::min_coeff_visitor<Derived> minVisitor;
229 this->visit(minVisitor);
230 *index = IndexType((RowsAtCompileTime==1) ? minVisitor.col : minVisitor.row);
231 return minVisitor.res;
232}

References Eigen::internal::coeff_visitor< Derived >::col, EIGEN_STATIC_ASSERT_VECTOR_ONLY, Eigen::internal::coeff_visitor< Derived >::res, and Eigen::internal::coeff_visitor< Derived >::row.

◆ minCoeff() [3/3]

template<typename Derived >
template<typename IndexType >
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::minCoeff ( IndexType *  rowId,
IndexType *  colId 
) const
inherited
Returns
the minimum of all coefficients of *this and puts in *row and *col its location.
Warning
the result is undefined if *this contains NaN.
See also
DenseBase::minCoeff(Index*), DenseBase::maxCoeff(Index*,Index*), DenseBase::visit(), DenseBase::minCoeff()
208{
209 internal::min_coeff_visitor<Derived> minVisitor;
210 this->visit(minVisitor);
211 *rowId = minVisitor.row;
212 if (colId) *colId = minVisitor.col;
213 return minVisitor.res;
214}

References Eigen::internal::coeff_visitor< Derived >::col, Eigen::internal::coeff_visitor< Derived >::res, and Eigen::internal::coeff_visitor< Derived >::row.

◆ nestByValue()

template<typename Derived >
const NestByValue< Derived > Eigen::DenseBase< Derived >::nestByValue
inlineinherited
Returns
an expression of the temporary version of *this.
104{
105 return NestByValue<Derived>(derived());
106}

◆ nestedExpression()

template<typename ExpressionType >
EIGEN_DEVICE_FUNC const internal::remove_all< NestedExpressionType >::type & Eigen::MatrixWrapper< ExpressionType >::nestedExpression ( ) const
inline

◆ noalias()

NoAlias< MatrixWrapper< ExpressionType > , MatrixBase > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::noalias
inherited
Returns
a pseudo expression of *this with an operator= assuming no aliasing between *this and the source expression.

More precisely, noalias() allows to bypass the EvalBeforeAssignBit flag. Currently, even though several expressions may alias, only product expressions have this flag. Therefore, noalias() is only usefull when the source expression contains a matrix product.

Here are some examples where noalias is usefull:

D.noalias() = A * B;
D.noalias() += A.transpose() * B;
D.noalias() -= 2 * A * B.adjoint();

On the other hand the following example will lead to a wrong result:

A.noalias() = A * B;

because the result matrix A is also an operand of the matrix product. Therefore, there is no alternative than evaluating A * B in a temporary, that is the default behavior when you write:

A = A * B;
See also
class NoAlias
102{
103 return NoAlias<Derived, Eigen::MatrixBase >(derived());
104}

◆ nonZeros()

template<typename Derived >
EIGEN_DEVICE_FUNC Index Eigen::DenseBase< Derived >::nonZeros ( ) const
inlineinherited
Returns
the number of nonzero coefficients which is in practice the number of stored coefficients.
210{ return size(); }

◆ norm()

EIGEN_STRONG_INLINE NumTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar >::Real Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::norm
inherited
Returns
, for vectors, the l2 norm of *this, and for matrices the Frobenius norm. In both cases, it consists in the square root of the sum of the square of all the matrix entries. For vectors, this is also equals to the square root of the dot product of *this with itself.
See also
lpNorm(), dot(), squaredNorm()
109{
110 return numext::sqrt(squaredNorm());
111}

◆ normalize()

EIGEN_STRONG_INLINE void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::normalize
inherited

Normalizes the vector, i.e. divides it by its own norm.

\only_for_vectors

Warning
If the input vector is too small (i.e., this->norm()==0), then *this is left unchanged.
See also
norm(), normalized()
146{
148 // NOTE: after extensive benchmarking, this conditional does not impact performance, at least on recent x86 CPU
149 if(z>RealScalar(0))
150 derived() /= numext::sqrt(z);
151}

◆ normalized()

EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::normalized
inherited
Returns
an expression of the quotient of *this by its own norm.
Warning
If the input vector is too small (i.e., this->norm()==0), then this function returns a copy of the input.

\only_for_vectors

See also
norm(), normalize()
125{
126 typedef typename internal::nested_eval<Derived,2>::type _Nested;
127 _Nested n(derived());
128 RealScalar z = n.squaredNorm();
129 // NOTE: after extensive benchmarking, this conditional does not impact performance, at least on recent x86 CPU
130 if(z>RealScalar(0))
131 return n / numext::sqrt(z);
132 else
133 return n;
134}

◆ NullaryExpr() [1/6]

template<typename Derived >
template<typename CustomNullaryOp >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseNullaryOp< CustomNullaryOp, typename DenseBase< Derived >::PlainObject > Eigen::DenseBase< Derived >::NullaryExpr ( const CustomNullaryOp &  func)
inherited
Returns
an expression of a matrix defined by a custom functor func

This variant is only for fixed-size DenseBase types. For dynamic-size types, you need to use the variants taking size arguments.

The template parameter CustomNullaryOp is the type of the functor.

See also
class CwiseNullaryOp
155{
156 return CwiseNullaryOp<CustomNullaryOp, PlainObject>(RowsAtCompileTime, ColsAtCompileTime, func);
157}

◆ NullaryExpr() [2/6]

template<typename Derived >
template<typename CustomNullaryOp >
static EIGEN_DEVICE_FUNC const CwiseNullaryOp< CustomNullaryOp, PlainObject > Eigen::DenseBase< Derived >::NullaryExpr ( const CustomNullaryOp &  func)
staticinherited

◆ NullaryExpr() [3/6]

template<typename Derived >
template<typename CustomNullaryOp >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseNullaryOp< CustomNullaryOp, typename DenseBase< Derived >::PlainObject > Eigen::DenseBase< Derived >::NullaryExpr ( Index  rows,
Index  cols,
const CustomNullaryOp &  func 
)
inherited
Returns
an expression of a matrix defined by a custom functor func

The parameters rows and cols are the number of rows and of columns of the returned matrix. Must be compatible with this MatrixBase type.

This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass rows and cols as arguments, so Zero() should be used instead.

The template parameter CustomNullaryOp is the type of the functor.

See also
class CwiseNullaryOp
110{
111 return CwiseNullaryOp<CustomNullaryOp, PlainObject>(rows, cols, func);
112}

◆ NullaryExpr() [4/6]

template<typename Derived >
template<typename CustomNullaryOp >
static EIGEN_DEVICE_FUNC const CwiseNullaryOp< CustomNullaryOp, PlainObject > Eigen::DenseBase< Derived >::NullaryExpr ( Index  rows,
Index  cols,
const CustomNullaryOp &  func 
)
staticinherited

◆ NullaryExpr() [5/6]

template<typename Derived >
template<typename CustomNullaryOp >
EIGEN_STRONG_INLINE const CwiseNullaryOp< CustomNullaryOp, typename DenseBase< Derived >::PlainObject > Eigen::DenseBase< Derived >::NullaryExpr ( Index  size,
const CustomNullaryOp &  func 
)
inherited
Returns
an expression of a matrix defined by a custom functor func

The parameter size is the size of the returned vector. Must be compatible with this MatrixBase type.

\only_for_vectors

This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass size as argument, so Zero() should be used instead.

The template parameter CustomNullaryOp is the type of the functor.

Here is an example with C++11 random generators:

Output:

See also
class CwiseNullaryOp
136{
138 if(RowsAtCompileTime == 1) return CwiseNullaryOp<CustomNullaryOp, PlainObject>(1, size, func);
139 else return CwiseNullaryOp<CustomNullaryOp, PlainObject>(size, 1, func);
140}

References EIGEN_STATIC_ASSERT_VECTOR_ONLY.

◆ NullaryExpr() [6/6]

template<typename Derived >
template<typename CustomNullaryOp >
static EIGEN_DEVICE_FUNC const CwiseNullaryOp< CustomNullaryOp, PlainObject > Eigen::DenseBase< Derived >::NullaryExpr ( Index  size,
const CustomNullaryOp &  func 
)
staticinherited

◆ Ones() [1/3]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::ConstantReturnType Eigen::DenseBase< Derived >::Ones
staticinherited
Returns
an expression of a fixed-size matrix or vector where all coefficients equal one.

This variant is only for fixed-size MatrixBase types. For dynamic-size types, you need to use the variants taking size arguments.

Example:

Output:

See also
Ones(Index), Ones(Index,Index), isOnes(), class Ones
598{
599 return Constant(Scalar(1));
600}
static EIGEN_DEVICE_FUNC const ConstantReturnType Constant(Index rows, Index cols, const Scalar &value)
Definition CwiseNullaryOp.h:174

◆ Ones() [2/3]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::ConstantReturnType Eigen::DenseBase< Derived >::Ones ( Index  rows,
Index  cols 
)
staticinherited
Returns
an expression of a matrix where all coefficients equal one.

The parameters rows and cols are the number of rows and of columns of the returned matrix. Must be compatible with this MatrixBase type.

This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass rows and cols as arguments, so Ones() should be used instead.

Example:

Output:

See also
Ones(), Ones(Index), isOnes(), class Ones
558{
559 return Constant(rows, cols, Scalar(1));
560}

◆ Ones() [3/3]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::ConstantReturnType Eigen::DenseBase< Derived >::Ones ( Index  newSize)
staticinherited
Returns
an expression of a vector where all coefficients equal one.

The parameter newSize is the size of the returned vector. Must be compatible with this MatrixBase type.

\only_for_vectors

This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass size as argument, so Ones() should be used instead.

Example:

Output:

See also
Ones(), Ones(Index,Index), isOnes(), class Ones
581{
582 return Constant(newSize, Scalar(1));
583}

◆ operator!=()

EIGEN_DEVICE_FUNC bool Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator!= ( const MatrixBase< OtherDerived > &  other) const
inlineinherited
Returns
true if at least one pair of coefficients of *this and other are not exactly equal to each other.
Warning
When using floating point scalar values you probably should rather use a fuzzy comparison such as isApprox()
See also
isApprox(), operator==
297 { return cwiseNotEqual(other).any(); }
EIGEN_DEVICE_FUNC const CwiseBinaryOp< std::not_equal_to< Scalar >, const Derived, const OtherDerived > cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
Definition MatrixCwiseBinaryOps.h:63

◆ operator*() [1/4]

const Product< MatrixWrapper< ExpressionType > , DiagonalDerived, LazyProduct > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator* ( const DiagonalBase< DiagonalDerived > &  a_diagonal) const
inlineinherited
Returns
the diagonal matrix product of *this by the diagonal matrix diagonal.
22{
23 return Product<Derived, DiagonalDerived, LazyProduct>(derived(),a_diagonal.derived());
24}

◆ operator*() [2/4]

EIGEN_DEVICE_FUNC const Product< MatrixWrapper< ExpressionType > , DiagonalDerived, LazyProduct > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator* ( const DiagonalBase< DiagonalDerived > &  diagonal) const
inherited

◆ operator*() [3/4]

const Product< MatrixWrapper< ExpressionType > , OtherDerived > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator* ( const MatrixBase< OtherDerived > &  other) const
inlineinherited
Returns
the matrix product of *this and other.
Note
If instead of the matrix product you want the coefficient-wise product, see Cwise::operator*().
See also
lazyProduct(), operator*=(const MatrixBase&), Cwise::operator*()
391{
392 // A note regarding the function declaration: In MSVC, this function will sometimes
393 // not be inlined since DenseStorage is an unwindable object for dynamic
394 // matrices and product types are holding a member to store the result.
395 // Thus it does not help tagging this function with EIGEN_STRONG_INLINE.
396 enum {
397 ProductIsValid = Derived::ColsAtCompileTime==Dynamic
398 || OtherDerived::RowsAtCompileTime==Dynamic
399 || int(Derived::ColsAtCompileTime)==int(OtherDerived::RowsAtCompileTime),
400 AreVectors = Derived::IsVectorAtCompileTime && OtherDerived::IsVectorAtCompileTime,
401 SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(Derived,OtherDerived)
402 };
403 // note to the lost user:
404 // * for a dot product use: v1.dot(v2)
405 // * for a coeff-wise product use: v1.cwiseProduct(v2)
406 EIGEN_STATIC_ASSERT(ProductIsValid || !(AreVectors && SameSizes),
407 INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)
408 EIGEN_STATIC_ASSERT(ProductIsValid || !(SameSizes && !AreVectors),
409 INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)
410 EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)
411#ifdef EIGEN_DEBUG_PRODUCT
412 internal::product_type<Derived,OtherDerived>::debug();
413#endif
414
415 return Product<Derived, OtherDerived>(derived(), other.derived());
416}

◆ operator*() [4/4]

EIGEN_DEVICE_FUNC const Product< MatrixWrapper< ExpressionType > , OtherDerived > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator* ( const MatrixBase< OtherDerived > &  other) const
inherited

◆ operator*=() [1/2]

MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator*= ( const EigenBase< OtherDerived > &  other)
inlineinherited

replaces *this by *this * other.

Returns
a reference to *this

Example:

Output:

 
498{
499 other.derived().applyThisOnTheRight(derived());
500 return derived();
501}

◆ operator*=() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & Eigen::DenseBase< MatrixWrapper< ExpressionType > >::operator*= ( const Scalar other)
inherited
19{
20 internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::mul_assign_op<Scalar,Scalar>());
21 return derived();
22}

◆ operator+=() [1/4]

MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator+= ( const ArrayBase< OtherDerived > &  )
inlineprotectedinherited
476 {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}

◆ operator+=() [2/4]

EIGEN_DEVICE_FUNC MatrixWrapper< ExpressionType > & Eigen::DenseBase< MatrixWrapper< ExpressionType > >::operator+= ( const EigenBase< OtherDerived > &  other)
inherited
143{
144 call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
145 return derived();
146}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst &dst, const Src &src)
Definition AssignEvaluator.h:780

◆ operator+=() [3/4]

EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator+= ( const MatrixBase< OtherDerived > &  other)
inherited

replaces *this by *this + other.

Returns
a reference to *this
176{
177 call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
178 return derived();
179}

◆ operator+=() [4/4]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator+= ( const MatrixBase< OtherDerived > &  other)
inherited

◆ operator-=() [1/4]

MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator-= ( const ArrayBase< OtherDerived > &  )
inlineprotectedinherited
479 {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}

◆ operator-=() [2/4]

EIGEN_DEVICE_FUNC MatrixWrapper< ExpressionType > & Eigen::DenseBase< MatrixWrapper< ExpressionType > >::operator-= ( const EigenBase< OtherDerived > &  other)
inherited
152{
153 call_assignment(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());
154 return derived();
155}

◆ operator-=() [3/4]

EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator-= ( const MatrixBase< OtherDerived > &  other)
inherited

replaces *this by *this - other.

Returns
a reference to *this
163{
164 call_assignment(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());
165 return derived();
166}

◆ operator-=() [4/4]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator-= ( const MatrixBase< OtherDerived > &  other)
inherited

◆ operator/=()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & Eigen::DenseBase< MatrixWrapper< ExpressionType > >::operator/= ( const Scalar other)
inherited
40{
41 internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::div_assign_op<Scalar,Scalar>());
42 return derived();
43}

◆ operator<<() [1/3]

template<typename Derived >
template<typename OtherDerived >
CommaInitializer< Derived > Eigen::DenseBase< Derived >::operator<< ( const DenseBase< OtherDerived > &  other)
inlineinherited
See also
operator<<(const Scalar&)
154{
155 return CommaInitializer<Derived>(*static_cast<Derived *>(this), other);
156}

◆ operator<<() [2/3]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC CommaInitializer< Derived > Eigen::DenseBase< Derived >::operator<< ( const DenseBase< OtherDerived > &  other)
inherited

◆ operator<<() [3/3]

template<typename Derived >
CommaInitializer< Derived > Eigen::DenseBase< Derived >::operator<< ( const Scalar s)
inlineinherited

Convenient operator to set the coefficients of a matrix.

The coefficients must be provided in a row major order and exactly match the size of the matrix. Otherwise an assertion is raised.

Example:

Output:

Note
According the c++ standard, the argument expressions of this comma initializer are evaluated in arbitrary order.
See also
CommaInitializer::finished(), class CommaInitializer
145{
146 return CommaInitializer<Derived>(*static_cast<Derived*>(this), s);
147}

◆ operator==()

EIGEN_DEVICE_FUNC bool Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operator== ( const MatrixBase< OtherDerived > &  other) const
inlineinherited
Returns
true if each coefficients of *this and other are all exactly equal.
Warning
When using floating point scalar values you probably should rather use a fuzzy comparison such as isApprox()
See also
isApprox(), operator!=
289 { return cwiseEqual(other).all(); }
EIGEN_DEVICE_FUNC const CwiseBinaryOp< std::equal_to< Scalar >, const Derived, const OtherDerived > cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
Definition MatrixCwiseBinaryOps.h:43

◆ operatorNorm()

MatrixBase< MatrixWrapper< ExpressionType > >::RealScalar Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::operatorNorm
inlineinherited

Computes the L2 operator norm.

Returns
Operator norm of the matrix.

\eigenvalues_module This function computes the L2 operator norm of a matrix, which is also known as the spectral norm. The norm of a matrix $ A $ is defined to be

\[ \|A\|_2 = \max_x \frac{\|Ax\|_2}{\|x\|_2} \]

where the maximum is over all vectors and the norm on the right is the Euclidean vector norm. The norm equals the largest singular value, which is the square root of the largest eigenvalue of the positive semi-definite matrix $ A^*A $.

The current implementation uses the eigenvalues of $ A^*A $, as computed by SelfAdjointView::eigenvalues(), to compute the operator norm of a matrix. The SelfAdjointView class provides a better algorithm for selfadjoint matrices.

Example:

Output:

See also
SelfAdjointView::eigenvalues(), SelfAdjointView::operatorNorm()
121{
122 using std::sqrt;
123 typename Derived::PlainObject m_eval(derived());
124 // FIXME if it is really guaranteed that the eigenvalues are already sorted,
125 // then we don't need to compute a maxCoeff() here, comparing the 1st and last ones is enough.
126 return sqrt((m_eval*m_eval.adjoint())
127 .eval()
128 .template selfadjointView<Lower>()
129 .eigenvalues()
130 .maxCoeff()
131 );
132}

◆ outerSize()

template<typename Derived >
EIGEN_DEVICE_FUNC Index Eigen::DenseBase< Derived >::outerSize ( ) const
inlineinherited
Returns
the outer size.
Note
For a vector, this returns just 1. For a matrix (non-vector), this is the major dimension with respect to the storage order, i.e., the number of columns for a column-major matrix, and the number of rows for a row-major matrix.
219 {
220 return IsVectorAtCompileTime ? 1
221 : int(IsRowMajor) ? this->rows() : this->cols();
222 }

References Eigen::DenseBase< Derived >::IsRowMajor, and Eigen::DenseBase< Derived >::IsVectorAtCompileTime.

◆ outerStride()

template<typename ExpressionType >
EIGEN_DEVICE_FUNC Index Eigen::MatrixWrapper< ExpressionType >::outerStride ( ) const
inline
166{ return m_expression.outerStride(); }

References Eigen::MatrixWrapper< ExpressionType >::m_expression.

◆ partialPivLu()

const PartialPivLU< typename MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::partialPivLu
inlineinherited

\lu_module

Returns
the partial-pivoting LU decomposition of *this.
See also
class PartialPivLU
590{
591 return PartialPivLU<PlainObject>(eval());
592}

◆ prod()

template<typename Derived >
EIGEN_STRONG_INLINE internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::prod
inherited
Returns
the product of all coefficients of *this

Example:

Output:

See also
sum(), mean(), trace()
484{
486 return Scalar(1);
487 return derived().redux(Eigen::internal::scalar_product_op<Scalar>());
488}
Definition BinaryFunctors.h:77

References Eigen::Dynamic.

◆ Random() [1/3]

template<typename Derived >
const DenseBase< Derived >::RandomReturnType Eigen::DenseBase< Derived >::Random
inlinestaticinherited
Returns
a fixed-size random matrix or vector expression

Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

This variant is only for fixed-size MatrixBase types. For dynamic-size types, you need to use the variants taking size arguments.

Example:

Output:

This expression has the "evaluate before nesting" flag so that it will be evaluated into a temporary matrix whenever it is nested in a larger expression. This prevents unexpected behavior with expressions involving random matrices.

\not_reentrant

See also
DenseBase::setRandom(), DenseBase::Random(Index,Index), DenseBase::Random(Index)
114{
115 return NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, internal::scalar_random_op<Scalar>());
116}

◆ Random() [2/3]

template<typename Derived >
const DenseBase< Derived >::RandomReturnType Eigen::DenseBase< Derived >::Random ( Index  rows,
Index  cols 
)
inlinestaticinherited
Returns
a random matrix expression

Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

The parameters rows and cols are the number of rows and of columns of the returned matrix. Must be compatible with this MatrixBase type.

\not_reentrant

This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass rows and cols as arguments, so Random() should be used instead.

Example:

Output:

This expression has the "evaluate before nesting" flag so that it will be evaluated into a temporary matrix whenever it is nested in a larger expression. This prevents unexpected behavior with expressions involving random matrices.

See DenseBase::NullaryExpr(Index, const CustomNullaryOp&) for an example using C++11 random generators.

See also
DenseBase::setRandom(), DenseBase::Random(Index), DenseBase::Random()
57{
58 return NullaryExpr(rows, cols, internal::scalar_random_op<Scalar>());
59}

◆ Random() [3/3]

template<typename Derived >
const DenseBase< Derived >::RandomReturnType Eigen::DenseBase< Derived >::Random ( Index  size)
inlinestaticinherited
Returns
a random vector expression

Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

The parameter size is the size of the returned vector. Must be compatible with this MatrixBase type.

\only_for_vectors \not_reentrant

This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass size as argument, so Random() should be used instead.

Example:

Output:

This expression has the "evaluate before nesting" flag so that it will be evaluated into a temporary vector whenever it is nested in a larger expression. This prevents unexpected behavior with expressions involving random matrices.

See also
DenseBase::setRandom(), DenseBase::Random(Index,Index), DenseBase::Random()
88{
89 return NullaryExpr(size, internal::scalar_random_op<Scalar>());
90}

◆ redux() [1/2]

template<typename Derived >
template<typename BinaryOp >
EIGEN_DEVICE_FUNC Scalar Eigen::DenseBase< Derived >::redux ( const BinaryOp &  func) const
inherited

Referenced by Eigen::internal::member_redux< BinaryOp, Scalar >::operator()().

+ Here is the caller graph for this function:

◆ redux() [2/2]

template<typename Derived >
template<typename Func >
EIGEN_STRONG_INLINE internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::redux ( const Func &  func) const
inherited
Returns
the result of a full redux operation on the whole matrix or vector using func

The template parameter BinaryOp is the type of the functor func which must be an associative operator. Both current C++98 and C++11 functor styles are handled.

See also
DenseBase::sum(), DenseBase::minCoeff(), DenseBase::maxCoeff(), MatrixBase::colwise(), MatrixBase::rowwise()
412{
413 eigen_assert(this->rows()>0 && this->cols()>0 && "you are using an empty matrix");
414
415 typedef typename internal::redux_evaluator<Derived> ThisEvaluator;
416 ThisEvaluator thisEval(derived());
417
418 return internal::redux_impl<Func, ThisEvaluator>::run(thisEval, func);
419}

References eigen_assert.

◆ replicate() [1/3]

template<typename Derived >
template<int RowFactor, int ColFactor>
EIGEN_DEVICE_FUNC const Replicate< Derived, RowFactor, ColFactor > Eigen::DenseBase< Derived >::replicate ( ) const
inherited

Referenced by igl::min_quad_with_fixed_solve().

+ Here is the caller graph for this function:

◆ replicate() [2/3]

template<typename Derived >
template<int RowFactor, int ColFactor>
const Replicate< Derived, RowFactor, ColFactor > Eigen::DenseBase< Derived >::replicate ( ) const
inherited
Returns
an expression of the replication of *this

Example:

Output:

See also
VectorwiseOp::replicate(), DenseBase::replicate(Index,Index), class Replicate
120{
121 return Replicate<Derived,RowFactor,ColFactor>(derived());
122}

◆ replicate() [3/3]

template<typename Derived >
EIGEN_DEVICE_FUNC const Replicate< Derived, Dynamic, Dynamic > Eigen::DenseBase< Derived >::replicate ( Index  rowFactor,
Index  colFactor 
) const
inlineinherited
Returns
an expression of the replication of *this

Example:

Output:

See also
VectorwiseOp::replicate(), DenseBase::replicate<int,int>(), class Replicate
555 {
556 return Replicate<Derived, Dynamic, Dynamic>(derived(), rowFactor, colFactor);
557 }

◆ resize() [1/2]

template<typename ExpressionType >
EIGEN_DEVICE_FUNC void Eigen::MatrixWrapper< ExpressionType >::resize ( Index  newSize)
inline

Forwards the resizing request to the nested expression

See also
DenseBase::resize(Index)
197{ m_expression.resize(newSize); }

References Eigen::MatrixWrapper< ExpressionType >::m_expression.

◆ resize() [2/2]

template<typename ExpressionType >
EIGEN_DEVICE_FUNC void Eigen::MatrixWrapper< ExpressionType >::resize ( Index  rows,
Index  cols 
)
inline

Forwards the resizing request to the nested expression

See also
DenseBase::resize(Index,Index)
201{ m_expression.resize(rows,cols); }
EIGEN_DEVICE_FUNC Index cols() const
Definition ArrayWrapper.h:164
EIGEN_DEVICE_FUNC Index rows() const
Definition ArrayWrapper.h:162

References Eigen::MatrixWrapper< ExpressionType >::cols(), Eigen::MatrixWrapper< ExpressionType >::m_expression, and Eigen::MatrixWrapper< ExpressionType >::rows().

+ Here is the call graph for this function:

◆ reverse() [1/2]

template<typename Derived >
DenseBase< Derived >::ReverseReturnType Eigen::DenseBase< Derived >::reverse
inlineinherited
Returns
an expression of the reverse of *this.

Example:

Output:

 
119{
120 return ReverseReturnType(derived());
121}
Reverse< Derived, BothDirections > ReverseReturnType
Definition DenseBase.h:559

◆ reverse() [2/2]

template<typename Derived >
EIGEN_DEVICE_FUNC ConstReverseReturnType Eigen::DenseBase< Derived >::reverse ( ) const
inlineinherited

This is the const version of reverse().

565 {
566 return ConstReverseReturnType(derived());
567 }
const Reverse< const Derived, BothDirections > ConstReverseReturnType
Definition DenseBase.h:560

◆ reverseInPlace()

template<typename Derived >
void Eigen::DenseBase< Derived >::reverseInPlace
inlineinherited

This is the "in place" version of reverse: it reverses *this.

In most cases it is probably better to simply use the reversed expression of a matrix. However, when reversing the matrix data itself is really needed, then this "in-place" version is probably the right choice because it provides the following additional benefits:

  • less error prone: doing the same operation with .reverse() requires special care:
    m = m.reverse().eval();
  • this API enables reverse operations without the need for a temporary
  • it allows future optimizations (cache friendliness, etc.)
See also
VectorwiseOp::reverseInPlace(), reverse()
140{
141 if(cols()>rows())
142 {
143 Index half = cols()/2;
144 leftCols(half).swap(rightCols(half).reverse());
145 if((cols()%2)==1)
146 {
147 Index half2 = rows()/2;
148 col(half).head(half2).swap(col(half).tail(half2).reverse());
149 }
150 }
151 else
152 {
153 Index half = rows()/2;
154 topRows(half).swap(bottomRows(half).reverse());
155 if((rows()%2)==1)
156 {
157 Index half2 = cols()/2;
158 row(half).head(half2).swap(row(half).tail(half2).reverse());
159 }
160 }
161}
EIGEN_DEVICE_FUNC ColsBlockXpr rightCols(Index n)
This is the const version of rightCols(Index).
Definition BlockMethods.h:658
EIGEN_DEVICE_FUNC ColsBlockXpr leftCols(Index n)
This is the const version of leftCols(Index).
Definition BlockMethods.h:602
EIGEN_DEVICE_FUNC RowsBlockXpr bottomRows(Index n)
This is the const version of bottomRows(Index).
Definition BlockMethods.h:488
EIGEN_DEVICE_FUNC RowsBlockXpr topRows(Index n)
This is the const version of topRows(Index).
Definition BlockMethods.h:432
EIGEN_DEVICE_FUNC ReverseReturnType reverse()
Definition Reverse.h:118

References bottomRows(), col(), leftCols(), rightCols(), row(), tail(), and topRows().

+ Here is the call graph for this function:

◆ rows()

template<typename ExpressionType >
EIGEN_DEVICE_FUNC Index Eigen::MatrixWrapper< ExpressionType >::rows ( ) const
inline
162{ return m_expression.rows(); }

References Eigen::MatrixWrapper< ExpressionType >::m_expression.

Referenced by Eigen::MatrixWrapper< ExpressionType >::resize().

+ Here is the caller graph for this function:

◆ rowwise() [1/2]

template<typename Derived >
DenseBase< Derived >::RowwiseReturnType Eigen::DenseBase< Derived >::rowwise
inlineinherited
Returns
a writable VectorwiseOp wrapper of *this providing additional partial reduction operations
See also
colwise(), class VectorwiseOp, TutorialReductionsVisitorsBroadcasting
689{
690 return RowwiseReturnType(derived());
691}
VectorwiseOp< Derived, Horizontal > RowwiseReturnType
Definition DenseBase.h:491

◆ rowwise() [2/2]

template<typename Derived >
EIGEN_DEVICE_FUNC ConstRowwiseReturnType Eigen::DenseBase< Derived >::rowwise ( ) const
inlineinherited
Returns
a VectorwiseOp wrapper of *this providing additional partial reduction operations

Example:

Output:

See also
colwise(), class VectorwiseOp, TutorialReductionsVisitorsBroadcasting
504 {
505 return ConstRowwiseReturnType(derived());
506 }
const VectorwiseOp< const Derived, Horizontal > ConstRowwiseReturnType
Definition DenseBase.h:492

Referenced by igl::normalize_row_sums(), and Eigen::umeyama().

+ Here is the caller graph for this function:

◆ select() [1/3]

template<typename Derived >
template<typename ThenDerived , typename ElseDerived >
const Select< Derived, ThenDerived, ElseDerived > Eigen::DenseBase< Derived >::select ( const DenseBase< ThenDerived > &  thenMatrix,
const DenseBase< ElseDerived > &  elseMatrix 
) const
inlineinherited
Returns
a matrix where each coefficient (i,j) is equal to thenMatrix(i,j) if *this(i,j), and elseMatrix(i,j) otherwise.

Example:

Output:

See also
class Select
126{
127 return Select<Derived,ThenDerived,ElseDerived>(derived(), thenMatrix.derived(), elseMatrix.derived());
128}

◆ select() [2/3]

template<typename Derived >
template<typename ThenDerived >
const Select< Derived, ThenDerived, typename ThenDerived::ConstantReturnType > Eigen::DenseBase< Derived >::select ( const DenseBase< ThenDerived > &  thenMatrix,
const typename ThenDerived::Scalar &  elseScalar 
) const
inlineinherited

Version of DenseBase::select(const DenseBase&, const DenseBase&) with the else expression being a scalar value.

See also
DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const, class Select
140{
141 return Select<Derived,ThenDerived,typename ThenDerived::ConstantReturnType>(
142 derived(), thenMatrix.derived(), ThenDerived::Constant(rows(),cols(),elseScalar));
143}

◆ select() [3/3]

template<typename Derived >
template<typename ElseDerived >
const Select< Derived, typename ElseDerived::ConstantReturnType, ElseDerived > Eigen::DenseBase< Derived >::select ( const typename ElseDerived::Scalar &  thenScalar,
const DenseBase< ElseDerived > &  elseMatrix 
) const
inlineinherited

Version of DenseBase::select(const DenseBase&, const DenseBase&) with the then expression being a scalar value.

See also
DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const, class Select
155{
156 return Select<Derived,typename ElseDerived::ConstantReturnType,ElseDerived>(
157 derived(), ElseDerived::Constant(rows(),cols(),thenScalar), elseMatrix.derived());
158}

◆ selfadjointView() [1/4]

EIGEN_DEVICE_FUNC SelfAdjointViewReturnType< UpLo >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::selfadjointView ( )
inherited

◆ selfadjointView() [2/4]

MatrixBase< MatrixWrapper< ExpressionType > >::template SelfAdjointViewReturnType< UpLo >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::selfadjointView ( )
inherited
Returns
an expression of a symmetric/self-adjoint view extracted from the upper or lower triangular part of the current matrix

The parameter UpLo can be either Upper or Lower

Example:

Output:

See also
class SelfAdjointView
346{
347 return typename SelfAdjointViewReturnType<UpLo>::Type(derived());
348}

◆ selfadjointView() [3/4]

EIGEN_DEVICE_FUNC ConstSelfAdjointViewReturnType< UpLo >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::selfadjointView ( ) const
inherited

◆ selfadjointView() [4/4]

MatrixBase< MatrixWrapper< ExpressionType > >::template ConstSelfAdjointViewReturnType< UpLo >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::selfadjointView ( ) const
inherited

This is the const version of MatrixBase::selfadjointView()

329{
330 return typename ConstSelfAdjointViewReturnType<UpLo>::Type(derived());
331}

◆ setConstant()

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::DenseBase< Derived >::setConstant ( const Scalar val)
inherited

Sets all coefficients in this expression to value val.

See also
fill(), setConstant(Index,const Scalar&), setConstant(Index,Index,const Scalar&), setZero(), setOnes(), Constant(), class CwiseNullaryOp, setZero(), setOnes()
326{
327 return derived() = Constant(rows(), cols(), val);
328}

Referenced by Eigen::ArrayBase< Derived >::operator=().

+ Here is the caller graph for this function:

◆ setIdentity() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::setIdentity
inherited

Writes the identity expression (not necessarily square) into *this.

Example:

Output:

See also
class CwiseNullaryOp, Identity(), Identity(Index,Index), isIdentity()
775{
776 return internal::setIdentity_impl<Derived>::run(derived());
777}

◆ setIdentity() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE MatrixWrapper< ExpressionType > & Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::setIdentity ( Index  rows,
Index  cols 
)
inherited

Resizes to the given size, and writes the identity expression (not necessarily square) into *this.

Parameters
rowsthe new number of rows
colsthe new number of columns

Example:

Output:

See also
MatrixBase::setIdentity(), class CwiseNullaryOp, MatrixBase::Identity()
791{
792 derived().resize(rows, cols);
793 return setIdentity();
794}
EIGEN_DEVICE_FUNC MatrixWrapper< ExpressionType > & setIdentity()
Definition CwiseNullaryOp.h:774

◆ setLinSpaced() [1/2]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::DenseBase< Derived >::setLinSpaced ( const Scalar low,
const Scalar high 
)
inherited

Sets a linearly spaced vector.

The function fills *this with equally spaced values in the closed interval [low,high]. When size is set to 1, a vector of length 1 containing 'high' is returned.

\only_for_vectors

For integer scalar types, do not miss the explanations on the definition of even spacing .

See also
LinSpaced(Index,const Scalar&,const Scalar&), setLinSpaced(Index, const Scalar&, const Scalar&), CwiseNullaryOp
404{
406 return setLinSpaced(size(), low, high);
407}
EIGEN_DEVICE_FUNC Derived & setLinSpaced(Index size, const Scalar &low, const Scalar &high)
Sets a linearly spaced vector.
Definition CwiseNullaryOp.h:383

References EIGEN_STATIC_ASSERT_VECTOR_ONLY.

◆ setLinSpaced() [2/2]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::DenseBase< Derived >::setLinSpaced ( Index  newSize,
const Scalar low,
const Scalar high 
)
inherited

Sets a linearly spaced vector.

The function generates 'size' equally spaced values in the closed interval [low,high]. When size is set to 1, a vector of length 1 containing 'high' is returned.

\only_for_vectors

Example:

Output:

For integer scalar types, do not miss the explanations on the definition of even spacing .

See also
LinSpaced(Index,const Scalar&,const Scalar&), CwiseNullaryOp
384{
386 return derived() = Derived::NullaryExpr(newSize, internal::linspaced_op<Scalar,PacketScalar>(low,high,newSize));
387}

References EIGEN_STATIC_ASSERT_VECTOR_ONLY.

◆ setOnes()

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::DenseBase< Derived >::setOnes
inherited

Sets all coefficients in this expression to one.

Example:

Output:

See also
class CwiseNullaryOp, Ones()
626{
627 return setConstant(Scalar(1));
628}

◆ setRandom()

template<typename Derived >
Derived & Eigen::DenseBase< Derived >::setRandom
inlineinherited

Sets all coefficients in this expression to random values.

Numbers are uniformly spread through their whole definition range for integer types, and in the [-1:1] range for floating point scalar types.

\not_reentrant

Example:

Output:

See also
class CwiseNullaryOp, setRandom(Index), setRandom(Index,Index)
132{
133 return *this = Random(rows(), cols());
134}
static const RandomReturnType Random()
Definition Random.h:113

◆ setZero()

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::DenseBase< Derived >::setZero
inherited

Sets all coefficients in this expression to zero.

Example:

Output:

See also
class CwiseNullaryOp, Zero()
500{
501 return setConstant(Scalar(0));
502}

Referenced by Eigen::SPQR< _MatrixType >::_solve_impl(), Eigen::PermutationBase< Derived >::evalTo(), and Eigen::InverseImpl< PermutationType, PermutationStorage >::evalTo().

+ Here is the caller graph for this function:

◆ sparseView()

const SparseView< MatrixWrapper< ExpressionType > > Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::sparseView ( const Scalar reference = Scalar(0),
const typename NumTraits< Scalar >::Real &  epsilon = NumTraits<Scalar>::dummy_precision() 
) const
inherited
Returns
a sparse expression of the dense expression *this with values smaller than reference * epsilon removed.

This method is typically used when prototyping to convert a quickly assembled dense Matrix D to a SparseMatrix S:

MatrixXd D(n,m);
S = D.sparseView(); // suppress numerical zeros (exact)
S = D.sparseView(reference);
S = D.sparseView(reference,epsilon);
A versatible sparse matrix representation.
Definition SparseMatrix.h:98

where reference is a meaningful non zero reference value, and epsilon is a tolerance factor defaulting to NumTraits<Scalar>::dummy_precision().

See also
SparseMatrixBase::pruned(), class SparseView
227{
228 return SparseView<Derived>(derived(), reference, epsilon);
229}

◆ squaredNorm()

EIGEN_STRONG_INLINE NumTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar >::Real Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::squaredNorm
inherited
Returns
, for vectors, the squared l2 norm of *this, and for matrices the Frobenius norm. In both cases, it consists in the sum of the square of all the matrix entries. For vectors, this is also equals to the dot product of *this with itself.
See also
dot(), norm(), lpNorm()
97{
98 return numext::real((*this).cwiseAbs2().sum());
99}

◆ stableNorm()

NumTraits< typenameinternal::traits< MatrixWrapper< ExpressionType > >::Scalar >::Real Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::stableNorm
inlineinherited
Returns
the l2 norm of *this avoiding underflow and overflow. This version use a blockwise two passes algorithm: 1 - find the absolute largest coefficient s 2 - compute $ s \Vert \frac{*this}{s} \Vert $ in a standard way

For architecture/scalar types supporting vectorization, this version is faster than blueNorm(). Otherwise the blueNorm() is much faster.

See also
norm(), blueNorm(), hypotNorm()
158{
159 using std::sqrt;
160 using std::abs;
161 const Index blockSize = 4096;
162 RealScalar scale(0);
163 RealScalar invScale(1);
164 RealScalar ssq(0); // sum of square
165
166 typedef typename internal::nested_eval<Derived,2>::type DerivedCopy;
167 typedef typename internal::remove_all<DerivedCopy>::type DerivedCopyClean;
168 const DerivedCopy copy(derived());
169
170 enum {
171 CanAlign = ( (int(DerivedCopyClean::Flags)&DirectAccessBit)
172 || (int(internal::evaluator<DerivedCopyClean>::Alignment)>0) // FIXME Alignment)>0 might not be enough
173 ) && (blockSize*sizeof(Scalar)*2<EIGEN_STACK_ALLOCATION_LIMIT)
174 && (EIGEN_MAX_STATIC_ALIGN_BYTES>0) // if we cannot allocate on the stack, then let's not bother about this optimization
175 };
176 typedef typename internal::conditional<CanAlign, Ref<const Matrix<Scalar,Dynamic,1,0,blockSize,1>, internal::evaluator<DerivedCopyClean>::Alignment>,
177 typename DerivedCopyClean::ConstSegmentReturnType>::type SegmentWrapper;
178 Index n = size();
179
180 if(n==1)
181 return abs(this->coeff(0));
182
183 Index bi = internal::first_default_aligned(copy);
184 if (bi>0)
185 internal::stable_norm_kernel(copy.head(bi), ssq, scale, invScale);
186 for (; bi<n; bi+=blockSize)
187 internal::stable_norm_kernel(SegmentWrapper(copy.segment(bi,numext::mini(blockSize, n - bi))), ssq, scale, invScale);
188 return scale * sqrt(ssq);
189}
#define EIGEN_MAX_STATIC_ALIGN_BYTES
Definition Macros.h:730
#define EIGEN_STACK_ALLOCATION_LIMIT
Definition Macros.h:801
int scale(const int val)
Definition WipeTowerDialog.cpp:14
const unsigned int DirectAccessBit
Definition Constants.h:150
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half abs(const half &a)
Definition Half.h:445

◆ stableNormalize()

EIGEN_STRONG_INLINE void Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::stableNormalize
inherited

Normalizes the vector while avoid underflow and overflow

\only_for_vectors

This method is analogue to the normalize() method, but it reduces the risk of underflow and overflow when computing the norm.

Warning
If the input vector is too small (i.e., this->norm()==0), then *this is left unchanged.
See also
stableNorm(), stableNormalized(), normalize()
192{
193 RealScalar w = cwiseAbs().maxCoeff();
194 RealScalar z = (derived()/w).squaredNorm();
195 if(z>RealScalar(0))
196 derived() /= numext::sqrt(z)*w;
197}

◆ stableNormalized()

EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::stableNormalized
inherited
Returns
an expression of the quotient of *this by its own norm while avoiding underflow and overflow.

\only_for_vectors

This method is analogue to the normalized() method, but it reduces the risk of underflow and overflow when computing the norm.

Warning
If the input vector is too small (i.e., this->norm()==0), then this function returns a copy of the input.
See also
stableNorm(), stableNormalize(), normalized()
168{
169 typedef typename internal::nested_eval<Derived,3>::type _Nested;
170 _Nested n(derived());
171 RealScalar w = n.cwiseAbs().maxCoeff();
172 RealScalar z = (n/w).squaredNorm();
173 if(z>RealScalar(0))
174 return n / (numext::sqrt(z)*w);
175 else
176 return n;
177}

◆ sum()

template<typename Derived >
EIGEN_STRONG_INLINE internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::sum
inherited
Returns
the sum of all coefficients of *this

If *this is empty, then the value 0 is returned.

See also
trace(), prod(), mean()
450{
452 return Scalar(0);
453 return derived().redux(Eigen::internal::scalar_sum_op<Scalar,Scalar>());
454}

References Eigen::Dynamic.

Referenced by igl::normalize_row_sums(), and Eigen::internal::lpNorm_selector< Derived, 1 >::run().

+ Here is the caller graph for this function:

◆ swap() [1/2]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC void Eigen::DenseBase< Derived >::swap ( const DenseBase< OtherDerived > &  other)
inlineinherited

swaps *this with the expression other.

415 {
416 EIGEN_STATIC_ASSERT(!OtherDerived::IsPlainObjectBase,THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);
417 eigen_assert(rows()==other.rows() && cols()==other.cols());
418 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
419 }

References eigen_assert, and EIGEN_STATIC_ASSERT.

Referenced by Eigen::internal::conservative_resize_like_impl< Derived, OtherDerived, IsVector >::run(), and Eigen::internal::conservative_resize_like_impl< Derived, OtherDerived, IsVector >::run().

+ Here is the caller graph for this function:

◆ swap() [2/2]

template<typename Derived >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC void Eigen::DenseBase< Derived >::swap ( PlainObjectBase< OtherDerived > &  other)
inlineinherited

swaps *this with the matrix or array other.

427 {
428 eigen_assert(rows()==other.rows() && cols()==other.cols());
429 call_assignment(derived(), other.derived(), internal::swap_assign_op<Scalar>());
430 }

References Eigen::PlainObjectBase< Derived >::cols(), eigen_assert, and Eigen::PlainObjectBase< Derived >::rows().

+ Here is the call graph for this function:

◆ trace()

EIGEN_STRONG_INLINE internal::traits< MatrixWrapper< ExpressionType > >::Scalar Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::trace
inherited
Returns
the trace of *this, i.e. the sum of the coefficients on the main diagonal.

*this can be any matrix, not necessarily square.

See also
diagonal(), sum()
499{
500 return derived().diagonal().sum();
501}

◆ transpose() [1/2]

template<typename Derived >
Transpose< Derived > Eigen::DenseBase< Derived >::transpose
inlineinherited
Returns
an expression of the transpose of *this.

Example:

Output:

Warning
If you want to replace a matrix by its own transpose, do NOT do this:
m = m.transpose(); // bug!!! caused by aliasing effect
Instead, use the transposeInPlace() method:
m.transposeInPlace();
which gives Eigen good opportunities for optimization, or alternatively you can also do:
m = m.transpose().eval();
See also
transposeInPlace(), adjoint()
173{
174 return TransposeReturnType(derived());
175}
Transpose< Derived > TransposeReturnType
Definition DenseBase.h:319

Referenced by igl::AABB< DerivedV, DIM >::find(), igl::AABB< DerivedV, DIM >::init(), igl::project(), igl::signed_distance_winding_number(), and igl::unproject().

+ Here is the caller graph for this function:

◆ transpose() [2/2]

template<typename Derived >
DenseBase< Derived >::ConstTransposeReturnType Eigen::DenseBase< Derived >::transpose
inlineinherited

This is the const version of transpose().

Make sure you read the warning for transpose() !

See also
transposeInPlace(), adjoint()
185{
186 return ConstTransposeReturnType(derived());
187}
internal::add_const< Transpose< constDerived > >::type ConstTransposeReturnType
Definition DenseBase.h:322

◆ transposeInPlace()

template<typename Derived >
void Eigen::DenseBase< Derived >::transposeInPlace
inlineinherited

This is the "in place" version of transpose(): it replaces *this by its own transpose. Thus, doing

m.transposeInPlace();

has the same effect on m as doing

m = m.transpose().eval();

and is faster and also safer because in the latter line of code, forgetting the eval() results in a bug caused by aliasing.

Notice however that this method is only useful if you want to replace a matrix by its own transpose. If you just need the transpose of a matrix, use transpose().

Note
if the matrix is not square, then *this must be a resizable matrix. This excludes (non-square) fixed-size matrices, block-expressions and maps.
See also
transpose(), adjoint(), adjointInPlace()
285{
287 && "transposeInPlace() called on a non-square non-resizable matrix");
288 internal::inplace_transpose_selector<Derived>::run(derived());
289}

References Eigen::Dynamic, and eigen_assert.

◆ triangularView() [1/4]

EIGEN_DEVICE_FUNC TriangularViewReturnType< Mode >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::triangularView ( )
inherited

◆ triangularView() [2/4]

MatrixBase< MatrixWrapper< ExpressionType > >::template TriangularViewReturnType< Mode >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::triangularView ( )
inherited
Returns
an expression of a triangular view extracted from the current matrix

The parameter Mode can have the following values: Upper, StrictlyUpper, UnitUpper, Lower, StrictlyLower, UnitLower.

Example:

Output:

See also
class TriangularView
629{
630 return typename TriangularViewReturnType<Mode>::Type(derived());
631}

◆ triangularView() [3/4]

EIGEN_DEVICE_FUNC ConstTriangularViewReturnType< Mode >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::triangularView ( ) const
inherited

◆ triangularView() [4/4]

MatrixBase< MatrixWrapper< ExpressionType > >::template ConstTriangularViewReturnType< Mode >::Type Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::triangularView ( ) const
inherited

This is the const version of MatrixBase::triangularView()

638{
639 return typename ConstTriangularViewReturnType<Mode>::Type(derived());
640}

◆ Unit() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::BasisReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::Unit ( Index  i)
staticinherited
Returns
an expression of the i-th unit (basis) vector.

\only_for_vectors

This variant is for fixed-size vector only.

See also
MatrixBase::Unit(Index,Index), MatrixBase::UnitX(), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()
819{
821 return BasisReturnType(SquareMatrixType::Identity(),i);
822}
Block< const CwiseNullaryOp< internal::scalar_identity_op< Scalar >, SquareMatrixType >, internal::traits< MatrixWrapper< ExpressionType > >::RowsAtCompileTime, internal::traits< MatrixWrapper< ExpressionType > >::ColsAtCompileTime > BasisReturnType
Definition MatrixBase.h:120

◆ Unit() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::BasisReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::Unit ( Index  newSize,
Index  i 
)
staticinherited
Returns
an expression of the i-th unit (basis) vector.

\only_for_vectors

See also
MatrixBase::Unit(Index), MatrixBase::UnitX(), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()
804{
806 return BasisReturnType(SquareMatrixType::Identity(newSize,newSize), i);
807}

◆ unitOrthogonal()

EIGEN_DEVICE_FUNC MatrixBase< MatrixWrapper< ExpressionType > >::PlainObject Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::unitOrthogonal ( void  ) const
inlineinherited

\geometry_module

Returns
a unit vector which is orthogonal to *this

The size of *this must be at least 2. If the size is exactly 2, then the returned vector is a counter clock wise rotation of *this, i.e., (-y,x).normalized().

See also
cross()
227{
229 return internal::unitOrthogonal_selector<Derived>::run(derived());
230}

◆ UnitW()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::BasisReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::UnitW
staticinherited
Returns
an expression of the W axis unit vector (0,0,0,1)

\only_for_vectors

See also
MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()
862{ return Derived::Unit(3); }

◆ UnitX()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::BasisReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::UnitX
staticinherited
Returns
an expression of the X axis unit vector (1{,0}^*)

\only_for_vectors

See also
MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()
832{ return Derived::Unit(0); }

◆ UnitY()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::BasisReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::UnitY
staticinherited
Returns
an expression of the Y axis unit vector (0,1{,0}^*)

\only_for_vectors

See also
MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()
842{ return Derived::Unit(1); }

◆ UnitZ()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const MatrixBase< MatrixWrapper< ExpressionType > >::BasisReturnType Eigen::MatrixBase< MatrixWrapper< ExpressionType > >::UnitZ
staticinherited
Returns
an expression of the Z axis unit vector (0,0,1{,0}^*)

\only_for_vectors

See also
MatrixBase::Unit(Index,Index), MatrixBase::Unit(Index), MatrixBase::UnitY(), MatrixBase::UnitZ(), MatrixBase::UnitW()
852{ return Derived::Unit(2); }

◆ value()

template<typename Derived >
EIGEN_DEVICE_FUNC CoeffReturnType Eigen::DenseBase< Derived >::value ( ) const
inlineinherited
Returns
the unique coefficient of a 1x1 expression
481 {
483 eigen_assert(this->rows() == 1 && this->cols() == 1);
484 return derived().coeff(0,0);
485 }
#define EIGEN_STATIC_ASSERT_SIZE_1x1(TYPE)
Definition StaticAssert.h:194

References eigen_assert, and EIGEN_STATIC_ASSERT_SIZE_1x1.

Referenced by igl::find(), and Eigen::ArrayBase< Derived >::operator=().

+ Here is the caller graph for this function:

◆ visit()

template<typename Derived >
template<typename Visitor >
EIGEN_DEVICE_FUNC void Eigen::DenseBase< Derived >::visit ( Visitor &  visitor) const
inherited

Applies the visitor visitor to the whole coefficients of the matrix or vector.

The template parameter Visitor is the type of the visitor and provides the following interface:

struct MyVisitor {
// called for the first coefficient
void init(const Scalar& value, Index i, Index j);
// called for all other coefficients
void operator() (const Scalar& value, Index i, Index j);
};
Note
compared to one or two for loops, visitors offer automatic unrolling for small fixed size matrix.
See also
minCoeff(Index*,Index*), maxCoeff(Index*,Index*), DenseBase::redux()
108{
109 typedef typename internal::visitor_evaluator<Derived> ThisEvaluator;
110 ThisEvaluator thisEval(derived());
111
112 enum {
113 unroll = SizeAtCompileTime != Dynamic
115 };
116 return internal::visitor_impl<Visitor, ThisEvaluator, unroll ? int(SizeAtCompileTime) : Dynamic>::run(thisEval, visitor);
117}
@ Cost
Definition XprHelper.h:150

References Eigen::Dynamic, and EIGEN_UNROLLING_LIMIT.

◆ Zero() [1/3]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::ConstantReturnType Eigen::DenseBase< Derived >::Zero
staticinherited
Returns
an expression of a fixed-size zero matrix or vector.

This variant is only for fixed-size MatrixBase types. For dynamic-size types, you need to use the variants taking size arguments.

Example:

Output:

See also
Zero(Index), Zero(Index,Index)
468{
469 return Constant(Scalar(0));
470}

◆ Zero() [2/3]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::ConstantReturnType Eigen::DenseBase< Derived >::Zero ( Index  rows,
Index  cols 
)
staticinherited
Returns
an expression of a zero matrix.

The parameters rows and cols are the number of rows and of columns of the returned matrix. Must be compatible with this MatrixBase type.

This variant is meant to be used for dynamic-size matrix types. For fixed-size types, it is redundant to pass rows and cols as arguments, so Zero() should be used instead.

Example:

Output:

See also
Zero(), Zero(Index)
428{
429 return Constant(rows, cols, Scalar(0));
430}

◆ Zero() [3/3]

template<typename Derived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DenseBase< Derived >::ConstantReturnType Eigen::DenseBase< Derived >::Zero ( Index  size)
staticinherited
Returns
an expression of a zero vector.

The parameter size is the size of the returned vector. Must be compatible with this MatrixBase type.

\only_for_vectors

This variant is meant to be used for dynamic-size vector types. For fixed-size types, it is redundant to pass size as argument, so Zero() should be used instead.

Example:

Output:

See also
Zero(), Zero(Index,Index)
451{
452 return Constant(size, Scalar(0));
453}

Friends And Related Symbol Documentation

◆ operator<<()

template<typename Derived >
std::ostream & operator<< ( std::ostream &  s,
const DenseBase< Derived > &  m 
)
related

Outputs the matrix, to the given stream.

If you wish to print the matrix with a format different than the default, use DenseBase::format().

It is also possible to change the default format by defining EIGEN_DEFAULT_IO_FORMAT before including Eigen headers. If not defined, this will automatically be defined to Eigen::IOFormat(), that is the Eigen::IOFormat with default parameters.

See also
DenseBase::format()
219{
221}
#define EIGEN_DEFAULT_IO_FORMAT
Definition Macros.h:810
std::ostream & print_matrix(std::ostream &s, const Derived &_m, const IOFormat &fmt)
Definition IO.h:129

References EIGEN_DEFAULT_IO_FORMAT, and Eigen::internal::print_matrix().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_expression


The documentation for this class was generated from the following files: