11 #ifndef EIGEN_MATRIXBASE_H 12 #define EIGEN_MATRIXBASE_H 52 #ifndef EIGEN_PARSED_BY_DOXYGEN 71 using Base::const_cast_derived;
79 using Base::operator-;
80 using Base::operator+=;
81 using Base::operator-=;
82 using Base::operator*=;
83 using Base::operator/=;
89 #endif // not EIGEN_PARSED_BY_DOXYGEN 93 #ifndef EIGEN_PARSED_BY_DOXYGEN 97 #endif // not EIGEN_PARSED_BY_DOXYGEN 106 #ifndef EIGEN_PARSED_BY_DOXYGEN 112 ConstTransposeReturnType
122 #endif // not EIGEN_PARSED_BY_DOXYGEN 124 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::MatrixBase 125 #define EIGEN_DOC_UNARY_ADDONS(X,Y) 126 # include "../plugins/CommonCwiseBinaryOps.h" 127 # include "../plugins/MatrixCwiseUnaryOps.h" 128 # include "../plugins/MatrixCwiseBinaryOps.h" 129 # ifdef EIGEN_MATRIXBASE_PLUGIN 130 # include EIGEN_MATRIXBASE_PLUGIN 132 #undef EIGEN_CURRENT_STORAGE_BASE_CLASS 133 #undef EIGEN_DOC_UNARY_ADDONS 144 template <
typename OtherDerived>
148 template <
typename OtherDerived>
152 template<
typename OtherDerived>
156 template<
typename OtherDerived>
159 template<
typename OtherDerived>
163 template<
typename OtherDerived>
168 template<
typename OtherDerived>
173 template<
typename OtherDerived>
176 template<
typename OtherDerived>
179 template<
typename OtherDerived>
182 template<
typename DiagonalDerived>
187 template<
typename OtherDerived>
211 ConstDiagonalReturnType
diagonal()
const;
230 ConstDiagonalDynamicIndexReturnType
diagonal(
Index index)
const;
235 template<
unsigned int Mode>
238 template<
unsigned int Mode>
245 template<
unsigned int UpLo>
248 template<
unsigned int UpLo>
280 template<
typename OtherDerived>
289 template<
typename OtherDerived>
297 template<
typename OtherDerived>
334 template<
typename ResultType>
342 template<
typename ResultType>
376 #ifndef EIGEN_PARSED_BY_DOXYGEN 377 template<
typename OtherDerived>
struct cross_product_return_type {
382 #endif // EIGEN_PARSED_BY_DOXYGEN 383 template<
typename OtherDerived>
385 #ifndef EIGEN_PARSED_BY_DOXYGEN 392 template<
typename OtherDerived>
412 typedef Block<
const Derived,
413 internal::traits<Derived>::ColsAtCompileTime==1 ?
SizeMinusOne : 1,
417 inline const HNormalizedReturnType
hnormalized()
const;
423 template<
typename EssentialPart>
426 Scalar& tau, RealScalar& beta)
const;
427 template<
typename EssentialPart>
432 template<
typename EssentialPart>
440 template<
typename OtherScalar>
443 template<
typename OtherScalar>
449 template<
typename OtherDerived>
459 #define EIGEN_MATRIX_FUNCTION(ReturnType, Name, Description) \ 461 const ReturnType<Derived> Name() const; 462 #define EIGEN_MATRIX_FUNCTION_1(ReturnType, Name, Description, Argument) \ 464 const ReturnType<Derived> Name(Argument) const; 468 const MatrixFunctionReturnValue<Derived>
matrixFunction(StemFunction
f)
const;
471 #if EIGEN_HAS_CXX11_MATH 512 template<
typename Derived>
513 template<
typename OtherDerived>
517 other.
derived().applyThisOnTheRight(derived());
526 template<
typename Derived>
527 template<
typename OtherDerived>
530 other.
derived().applyThisOnTheRight(derived());
538 template<
typename Derived>
539 template<
typename OtherDerived>
542 other.
derived().applyThisOnTheLeft(derived());
547 #endif // EIGEN_MATRIXBASE_H
static EIGEN_DEVICE_FUNC const IdentityReturnType Identity()
Generic expression of a matrix where all coefficients are defined by a functor.
Robust Cholesky decomposition of a matrix with pivoting.
EIGEN_DEVICE_FUNC const CwiseBinaryOp< numext::equal_to< Scalar >, const Derived, const OtherDerived > cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
static EIGEN_DEVICE_FUNC const BasisReturnType Unit(Index size, Index i)
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC const CwiseBinaryOp< numext::not_equal_to< Scalar >, const Derived, const OtherDerived > cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
static EIGEN_DEVICE_FUNC const BasisReturnType UnitY()
Jet< T, N > cos(const Jet< T, N > &f)
RealScalar blueNorm() const
EIGEN_DEVICE_FUNC bool operator!=(const MatrixBase< OtherDerived > &other) const
BDCSVD< PlainObject > bdcSvd(unsigned int computationOptions=0) const
Matrix< Scalar, MatrixBase::RowsAtCompileTime, MatrixBase::ColsAtCompileTime > type
Expression of the product of two arbitrary matrices or vectors.
Expression of a mathematical vector or matrix as an array object.
Householder rank-revealing QR decomposition of a matrix with full pivoting.
Base::CoeffReturnType CoeffReturnType
CwiseNullaryOp< internal::scalar_identity_op< Scalar >, PlainObject > IdentityReturnType
EIGEN_DEVICE_FUNC PlainObject unitOrthogonal(void) const
const CompleteOrthogonalDecomposition< PlainObject > completeOrthogonalDecomposition() const
EIGEN_DEVICE_FUNC const MatrixBase< Derived > & matrix() const
const MatrixFunctionReturnValue< Derived > matrixFunction(StemFunction f) const
Helper function for the unsupported MatrixFunctions module.
void applyOnTheLeft(const EigenBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC PlainObject cross3(const MatrixBase< OtherDerived > &other) const
Pseudo expression providing an operator = assuming no aliasing.
internal::stem_function< Scalar >::type StemFunction
Diagonal< Derived, Index > Type
EIGEN_DEVICE_FUNC HomogeneousReturnType homogeneous() const
EIGEN_DEVICE_FUNC void normalize()
ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType Scalar
SelfAdjointView< Derived, UpLo > Type
EIGEN_DEVICE_FUNC RealScalar squaredNorm() const
bool isUnitary(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
const ColPivHouseholderQR< PlainObject > colPivHouseholderQr() const
EIGEN_DEVICE_FUNC const PlainObject normalized() const
MatrixBase StorageBaseType
internal::add_const< Transpose< const Derived > >::type ConstTransposeReturnType
EIGEN_DEVICE_FUNC const Inverse< Derived > inverse() const
void applyOnTheRight(const EigenBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC Derived & setUnit(Index i)
Set the coefficients of *this to the i-th unit (basis) vector.
Jet< T, N > sin(const Jet< T, N > &f)
LU decomposition of a matrix with partial pivoting, and related features.
Namespace containing all symbols from the Eigen library.
Block< const Derived, internal::traits< Derived >::ColsAtCompileTime==1 ? SizeMinusOne :1, internal::traits< Derived >::ColsAtCompileTime==1 ? 1 :SizeMinusOne > ConstStartMinusOne
Rotation given by a cosine-sine pair.
NoAlias< Derived, Eigen::MatrixBase > EIGEN_DEVICE_FUNC noalias()
EIGEN_DEVICE_FUNC MatrixBase< Derived > & matrix()
EIGEN_DEVICE_FUNC RealScalar norm() const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC const Product< Derived, OtherDerived, LazyProduct > lazyProduct(const MatrixBase< OtherDerived > &other) const
static EIGEN_DEVICE_FUNC const BasisReturnType UnitW()
Base::ConstTransposeReturnType ConstTransposeReturnType
internal::traits< Derived >::Scalar Scalar
static EIGEN_DEVICE_FUNC const BasisReturnType UnitZ()
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
Complete orthogonal decomposition (COD) of a matrix.
RealScalar stableNorm() const
const FullPivLU< PlainObject > fullPivLu() const
const unsigned int RowMajorBit
Base class for all dense matrices, vectors, and arrays.
EIGEN_DEVICE_FUNC const SinhReturnType sinh() const
EIGEN_DEVICE_FUNC const LogReturnType log() const
EIGEN_DEVICE_FUNC SelfAdjointViewReturnType< UpLo >::Type selfadjointView()
EIGEN_DEVICE_FUNC void makeHouseholder(EssentialPart &essential, Scalar &tau, RealScalar &beta) const
const TriangularView< const Derived, Mode > Type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator-=(const MatrixBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC void applyHouseholderOnTheRight(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Block< Derived, internal::traits< Derived >::RowsAtCompileTime, 1, !IsRowMajor > ColXpr
EIGEN_DEVICE_FUNC const Product< Derived, OtherDerived > operator*(const MatrixBase< OtherDerived > &other) const
internal::packet_traits< Scalar >::type PacketScalar
EIGEN_DEVICE_FUNC Index diagonalSize() const
void computeInverseAndDetWithCheck(ResultType &inverse, typename ResultType::Scalar &determinant, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
EIGEN_DEVICE_FUNC void stableNormalize()
EIGEN_DEVICE_FUNC const HNormalizedReturnType hnormalized() const
homogeneous normalization
Expression of the inverse of another expression.
EIGEN_DEVICE_FUNC Scalar trace() const
EIGEN_DEVICE_FUNC const ExpReturnType exp() const
EIGEN_DEVICE_FUNC cross_product_return_type< OtherDerived >::type cross(const MatrixBase< OtherDerived > &other) const
EIGEN_DEVICE_FUNC MatrixBase(int)
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
const Derived & forceAlignedAccessIf() const
const PermutationWrapper< const Derived > asPermutation() const
const Derived & forceAlignedAccess() const
EIGEN_DEVICE_FUNC bool operator==(const MatrixBase< OtherDerived > &other) const
static EIGEN_DEVICE_FUNC const BasisReturnType UnitX()
Base class of any sparse matrices or sparse expressions.
EIGEN_DEVICE_FUNC const SquareReturnType square() const
EIGEN_STRONG_INLINE const CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct(const MatrixBase< OtherDerived > &other) const
EIGEN_DEVICE_FUNC void adjointInPlace()
EIGEN_DEVICE_FUNC void makeHouseholderInPlace(Scalar &tau, RealScalar &beta)
EIGEN_DEVICE_FUNC const AdjointReturnType adjoint() const
EIGEN_DEVICE_FUNC Matrix< Scalar, 3, 1 > eulerAngles(Index a0, Index a1, Index a2) const
CwiseNullaryOp< internal::scalar_constant_op< Scalar >, PlainObject > ConstantReturnType
JacobiSVD< PlainObject > jacobiSvd(unsigned int computationOptions=0) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ArrayWrapper< Derived > array()
Householder rank-revealing QR decomposition of a matrix with column-pivoting.
const Diagonal< const Derived, Index > Type
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
EIGEN_DEVICE_FUNC RealScalar lpNorm() const
Block< const CwiseNullaryOp< internal::scalar_identity_op< Scalar >, SquareMatrixType >, internal::traits< Derived >::RowsAtCompileTime, internal::traits< Derived >::ColsAtCompileTime > BasisReturnType
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
const SelfAdjointView< const Derived, UpLo > Type
DenseBase< Derived > Base
NumTraits< Scalar >::Real RealScalar
Homogeneous< Derived, HomogeneousReturnTypeDirection > HomogeneousReturnType
const HouseholderQR< PlainObject > householderQr() const
bool isDiagonal(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
internal::traits< Derived >::StorageKind StorageKind
EIGEN_DEVICE_FUNC TriangularViewReturnType< Mode >::Type triangularView()
EIGEN_DEVICE_FUNC ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType dot(const MatrixBase< OtherDerived > &other) const
Base::PlainObject PlainObject
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
typedef EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(ConstStartMinusOne, Scalar, quotient) HNormalizedReturnType
EIGEN_DEVICE_FUNC const Scalar & q
Expression of a dense or sparse matrix with zero or too small values removed.
Diagonal< Derived, DynamicIndex > DiagonalDynamicIndexReturnType
EIGEN_DEVICE_FUNC const PlainObject stableNormalized() const
Block< Derived, 1, internal::traits< Derived >::ColsAtCompileTime, IsRowMajor > RowXpr
internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, ConstTransposeReturnType >, ConstTransposeReturnType >::type AdjointReturnType
Base class for all 1D and 2D array, and related expressions.
Class to view a vector of integers as a permutation matrix.
#define EIGEN_MATRIX_FUNCTION(ReturnType, Name, Description)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
const PartialPivLU< PlainObject > partialPivLu() const
Derived & operator+=(const ArrayBase< OtherDerived > &)
class Bidiagonal Divide and Conquer SVD
const LDLT< PlainObject > ldlt() const
Derived & forceAlignedAccessIf()
EIGEN_DEVICE_FUNC const DiagonalWrapper< const Derived > asDiagonal() const
Derived & operator-=(const ArrayBase< OtherDerived > &)
#define EIGEN_DEVICE_FUNC
RealScalar operatorNorm() const
Computes the L2 operator norm.
internal::add_const< Diagonal< const Derived > >::type ConstDiagonalReturnType
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
internal::conditional< internal::is_same< typename internal::traits< Derived >::XprKind, MatrixXpr >::value, PlainMatrix, PlainArray >::type PlainObject
The plain matrix or array type corresponding to this expression.
EIGEN_DEVICE_FUNC void applyHouseholderOnTheLeft(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Expression of a fixed-size or dynamic-size block.
Matrix< std::complex< RealScalar >, internal::traits< Derived >::ColsAtCompileTime, 1, ColMajor > EigenvaluesReturnType
internal::add_const< Diagonal< const Derived, DynamicIndex > >::type ConstDiagonalDynamicIndexReturnType
const SparseView< Derived > sparseView(const Scalar &m_reference=Scalar(0), const typename NumTraits< Scalar >::Real &m_epsilon=NumTraits< Scalar >::dummy_precision()) const
EIGEN_STRONG_INLINE const SparseMatrixBase< OtherDerived >::template CwiseProductDenseReturnType< Derived >::Type cwiseProduct(const SparseMatrixBase< OtherDerived > &other) const
LU decomposition of a matrix with complete pivoting, and related features.
#define EIGEN_MATRIX_FUNCTION_1(ReturnType, Name, Description, Argument)
EIGEN_DEPRECATED EIGEN_DEVICE_FUNC Derived & lazyAssign(const DenseBase< OtherDerived > &other)
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
EIGEN_DEVICE_FUNC DiagonalReturnType diagonal()
Householder QR decomposition of a matrix.
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Expression of a triangular part in a matrix.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvalReturnType eval() const
Expression of a diagonal matrix.
Derived & forceAlignedAccess()
const LLT< PlainObject > llt() const
Derived & operator*=(const EigenBase< OtherDerived > &other)
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
bool isOrthogonal(const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
const PartialPivLU< PlainObject > lu() const
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Jet< T, N > sqrt(const Jet< T, N > &f)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArrayWrapper< const Derived > array() const
bool isIdentity(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Jet< T, N > pow(const Jet< T, N > &f, double g)
Generic expression where a coefficient-wise unary operator is applied to an expression.
The matrix class, also used for vectors and row-vectors.
void computeInverseWithCheck(ResultType &inverse, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
Diagonal< Derived > DiagonalReturnType
EIGEN_DEVICE_FUNC const CoshReturnType cosh() const
internal::traits< Derived >::StorageIndex StorageIndex
TriangularView< Derived, Mode > Type
#define EIGEN_SIZE_MAX(a, b)
const FullPivHouseholderQR< PlainObject > fullPivHouseholderQr() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const MatrixBase &other)
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
EIGEN_DEVICE_FUNC Derived & derived()
Base class for all dense matrices, vectors, and expressions.
Base::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC Derived & setIdentity()
EIGEN_DEVICE_FUNC Scalar determinant() const
Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
Expression of one (or a set of) homogeneous vector(s)
RealScalar hypotNorm() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator+=(const MatrixBase< OtherDerived > &other)