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/=;
88 #endif // not EIGEN_PARSED_BY_DOXYGEN 92 #ifndef EIGEN_PARSED_BY_DOXYGEN 96 #endif // not EIGEN_PARSED_BY_DOXYGEN 105 #ifndef EIGEN_PARSED_BY_DOXYGEN 111 ConstTransposeReturnType
121 #endif // not EIGEN_PARSED_BY_DOXYGEN 123 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::MatrixBase 124 #define EIGEN_DOC_UNARY_ADDONS(X,Y) 125 # include "../plugins/CommonCwiseUnaryOps.h" 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>
193 EIGEN_DEVICE_FUNC RealScalar
norm()
const;
197 EIGEN_DEVICE_FUNC
const PlainObject
normalized()
const;
202 EIGEN_DEVICE_FUNC
const AdjointReturnType
adjoint()
const;
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>
254 EIGEN_DEVICE_FUNC
static const IdentityReturnType
Identity();
257 EIGEN_DEVICE_FUNC
static const BasisReturnType
Unit(
Index i);
258 EIGEN_DEVICE_FUNC
static const BasisReturnType
UnitX();
259 EIGEN_DEVICE_FUNC
static const BasisReturnType
UnitY();
260 EIGEN_DEVICE_FUNC
static const BasisReturnType
UnitZ();
261 EIGEN_DEVICE_FUNC
static const BasisReturnType
UnitW();
278 template<
typename OtherDerived>
287 template<
typename OtherDerived>
295 template<
typename OtherDerived>
308 EIGEN_DEVICE_FUNC Scalar
trace()
const;
310 template<
int p> EIGEN_DEVICE_FUNC RealScalar
lpNorm()
const;
331 template<
typename ResultType>
338 template<
typename ResultType>
370 #ifndef EIGEN_PARSED_BY_DOXYGEN 371 template<
typename OtherDerived>
struct cross_product_return_type {
376 #endif // EIGEN_PARSED_BY_DOXYGEN 377 template<
typename OtherDerived>
379 #ifndef EIGEN_PARSED_BY_DOXYGEN 386 template<
typename OtherDerived>
406 typedef Block<
const Derived,
407 internal::traits<Derived>::ColsAtCompileTime==1 ?
SizeMinusOne : 1,
411 inline const HNormalizedReturnType
hnormalized() const;
416 template<typename EssentialPart>
418 Scalar& tau, RealScalar& beta) const;
419 template<typename EssentialPart>
423 template<typename EssentialPart>
430 template<typename OtherScalar>
432 template<typename OtherScalar>
437 template<typename OtherDerived>
441 return other.cwiseProduct(derived());
447 #define EIGEN_MATRIX_FUNCTION(ReturnType, Name, Description) \ 449 const ReturnType<Derived> Name() const; 450 #define EIGEN_MATRIX_FUNCTION_1(ReturnType, Name, Description, Argument) \ 452 const ReturnType<Derived> Name(Argument) const; 456 const MatrixFunctionReturnValue<Derived>
matrixFunction(StemFunction
f) const;
494 template<
typename Derived>
495 template<
typename OtherDerived>
499 other.
derived().applyThisOnTheRight(derived());
508 template<
typename Derived>
509 template<
typename OtherDerived>
512 other.
derived().applyThisOnTheRight(derived());
520 template<
typename Derived>
521 template<
typename OtherDerived>
524 other.
derived().applyThisOnTheLeft(derived());
529 #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.
static EIGEN_DEVICE_FUNC const BasisReturnType Unit(Index size, Index i)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator+=(const MatrixBase< OtherDerived > &other)
#define EIGEN_STRONG_INLINE
static EIGEN_DEVICE_FUNC const BasisReturnType UnitY()
Scalar determinant() const
const LDLT< PlainObject > ldlt() const
EIGEN_DEVICE_FUNC const CwiseBinaryOp< std::not_equal_to< Scalar >, const Derived, const OtherDerived > cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
Matrix< Scalar, MatrixBase::RowsAtCompileTime, MatrixBase::ColsAtCompileTime > type
EIGEN_DEVICE_FUNC Index diagonalSize() const
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
void applyOnTheLeft(const EigenBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC const Product< Derived, OtherDerived > operator*(const MatrixBase< OtherDerived > &other) const
Pseudo expression providing an operator = assuming no aliasing.
EIGEN_DEVICE_FUNC Scalar trace() const
EIGEN_DEVICE_FUNC const ExpReturnType exp() const
internal::stem_function< Scalar >::type StemFunction
Diagonal< Derived, Index > Type
ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType Scalar
SelfAdjointView< Derived, UpLo > Type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator-=(const MatrixBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType dot(const MatrixBase< OtherDerived > &other) const
MatrixBase StorageBaseType
internal::add_const< Transpose< const Derived > >::type ConstTransposeReturnType
RealScalar operatorNorm() const
Computes the L2 operator norm.
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
void applyOnTheRight(const EigenBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArrayWrapper< const Derived > array() const
EIGEN_DEVICE_FUNC const LogReturnType log() const
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
EIGEN_DEVICE_FUNC const CoshReturnType cosh() const
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.
EIGEN_DEVICE_FUNC MatrixBase< Derived > & matrix()
const Derived & forceAlignedAccess() const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
void makeHouseholder(EssentialPart &essential, Scalar &tau, RealScalar &beta) const
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC HomogeneousReturnType homogeneous() const
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
static EIGEN_DEVICE_FUNC const BasisReturnType UnitW()
Base::ConstTransposeReturnType ConstTransposeReturnType
EIGEN_DEVICE_FUNC const PlainObject stableNormalized() const
internal::traits< Derived >::Scalar Scalar
static EIGEN_DEVICE_FUNC const BasisReturnType UnitZ()
Complete orthogonal decomposition (COD) of a matrix.
const mpreal root(const mpreal &x, unsigned long int k, mp_rnd_t r=mpreal::get_default_rnd())
const unsigned int RowMajorBit
Base class for all dense matrices, vectors, and arrays.
EIGEN_DEVICE_FUNC SelfAdjointViewReturnType< UpLo >::Type selfadjointView()
const TriangularView< const Derived, Mode > Type
Block< Derived, internal::traits< Derived >::RowsAtCompileTime, 1,!IsRowMajor > ColXpr
internal::packet_traits< Scalar >::type PacketScalar
const PartialPivLU< PlainObject > partialPivLu() const
BDCSVD< PlainObject > bdcSvd(unsigned int computationOptions=0) const
void applyHouseholderOnTheLeft(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Expression of the inverse of another expression.
EIGEN_DEVICE_FUNC const HNormalizedReturnType hnormalized() const
homogeneous normalization
EIGEN_DEVICE_FUNC const CosReturnType cos() const
static EIGEN_DEVICE_FUNC const BasisReturnType UnitX()
Base class of any sparse matrices or sparse expressions.
RealScalar blueNorm() const
CwiseNullaryOp< internal::scalar_constant_op< Scalar >, PlainObject > ConstantReturnType
EIGEN_DEVICE_FUNC const SinhReturnType sinh() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvalReturnType eval() const
EIGEN_DEVICE_FUNC PlainObject unitOrthogonal(void) 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.
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
EIGEN_DEVICE_FUNC const Product< Derived, OtherDerived, LazyProduct > lazyProduct(const MatrixBase< OtherDerived > &other) const
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
internal::traits< Derived >::StorageKind StorageKind
EIGEN_DEVICE_FUNC TriangularViewReturnType< Mode >::Type triangularView()
Base::PlainObject PlainObject
void computeInverseAndDetWithCheck(ResultType &inverse, typename ResultType::Scalar &determinant, bool &invertible, const RealScalar &absDeterminantThreshold=NumTraits< Scalar >::dummy_precision()) const
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.
const CompleteOrthogonalDecomposition< PlainObject > completeOrthogonalDecomposition() const
Diagonal< Derived, DynamicIndex > DiagonalDynamicIndexReturnType
Block< Derived, 1, internal::traits< Derived >::ColsAtCompileTime, IsRowMajor > RowXpr
internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, ConstTransposeReturnType >, ConstTransposeReturnType >::type AdjointReturnType
EIGEN_DEVICE_FUNC const MatrixBase< Derived > & matrix() const
Base class for all 1D and 2D array, and related expressions.
Class to view a vector of integers as a permutation matrix.
EIGEN_DEVICE_FUNC void adjointInPlace()
#define EIGEN_MATRIX_FUNCTION(ReturnType, Name, Description)
RealScalar stableNorm() const
const ColPivHouseholderQR< PlainObject > colPivHouseholderQr() const
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
bool isIdentity(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
const Derived & forceAlignedAccessIf() const
const SparseView< Derived > sparseView(const Scalar &m_reference=Scalar(0), const typename NumTraits< Scalar >::Real &m_epsilon=NumTraits< Scalar >::dummy_precision()) const
Derived & operator+=(const ArrayBase< OtherDerived > &)
class Bidiagonal Divide and Conquer SVD
EIGEN_DEVICE_FUNC RealScalar squaredNorm() const
Derived & forceAlignedAccessIf()
Derived & operator-=(const ArrayBase< OtherDerived > &)
EIGEN_DEVICE_FUNC void normalize()
const PermutationWrapper< const Derived > asPermutation() const
internal::add_const< Diagonal< const Derived > >::type ConstDiagonalReturnType
EIGEN_DEVICE_FUNC Matrix< Scalar, 3, 1 > eulerAngles(Index a0, Index a1, Index a2) const
void computeInverseWithCheck(ResultType &inverse, bool &invertible, const RealScalar &absDeterminantThreshold=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.
bool isUnitary(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
EIGEN_DEVICE_FUNC cross_product_return_type< OtherDerived >::type cross(const MatrixBase< OtherDerived > &other) const
Expression of a fixed-size or dynamic-size block.
EIGEN_DEVICE_FUNC bool operator==(const MatrixBase< OtherDerived > &other) const
Matrix< std::complex< RealScalar >, internal::traits< Derived >::ColsAtCompileTime, 1, ColMajor > EigenvaluesReturnType
internal::add_const< Diagonal< const Derived, DynamicIndex > >::type ConstDiagonalDynamicIndexReturnType
EIGEN_DEVICE_FUNC RealScalar lpNorm() const
RealScalar hypotNorm() const
LU decomposition of a matrix with complete pivoting, and related features.
#define EIGEN_MATRIX_FUNCTION_1(ReturnType, Name, Description, Argument)
EIGEN_DEVICE_FUNC RealScalar norm() const
void applyHouseholderOnTheRight(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
const FullPivLU< PlainObject > fullPivLu() const
Householder QR decomposition of a matrix.
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Expression of a triangular part in a matrix.
EIGEN_DEVICE_FUNC MatrixBase()
Expression of a diagonal matrix.
Derived & forceAlignedAccess()
Derived & operator*=(const EigenBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC DiagonalReturnType diagonal()
EIGEN_DEVICE_FUNC PlainObject cross3(const MatrixBase< OtherDerived > &other) const
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
NoAlias< Derived, Eigen::MatrixBase > noalias()
EIGEN_STRONG_INLINE const SparseMatrixBase< OtherDerived >::template CwiseProductDenseReturnType< Derived >::Type cwiseProduct(const SparseMatrixBase< OtherDerived > &other) const
bool isOrthogonal(const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
const MatrixFunctionReturnValue< Derived > matrixFunction(StemFunction f) const
Helper function for the unsupported MatrixFunctions module.
EIGEN_DEVICE_FUNC const SinReturnType sin() const
const LLT< PlainObject > llt() const
void makeHouseholderInPlace(Scalar &tau, RealScalar &beta)
Jet< T, N > pow(const Jet< T, N > &f, double g)
Generic expression where a coefficient-wise unary operator is applied to an expression.
EIGEN_DEVICE_FUNC void stableNormalize()
EIGEN_DEVICE_FUNC const PlainObject normalized() const
bool isDiagonal(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
EIGEN_DEVICE_FUNC const DiagonalWrapper< const Derived > asDiagonal() const
The matrix class, also used for vectors and row-vectors.
Diagonal< Derived > DiagonalReturnType
EIGEN_DEVICE_FUNC const AdjointReturnType adjoint() const
internal::traits< Derived >::StorageIndex StorageIndex
TriangularView< Derived, Mode > Type
#define EIGEN_SIZE_MAX(a, b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const MatrixBase &other)
EIGEN_DEVICE_FUNC Derived & derived()
const Inverse< Derived > inverse() const
Base class for all dense matrices, vectors, and expressions.
EIGEN_DEVICE_FUNC bool operator!=(const MatrixBase< OtherDerived > &other) const
Base::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC Derived & setIdentity()
EIGEN_DEVICE_FUNC const CwiseBinaryOp< std::equal_to< Scalar >, const Derived, const OtherDerived > cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
const HouseholderQR< PlainObject > householderQr() const
EIGEN_DEVICE_FUNC const SquareReturnType square() const
JacobiSVD< PlainObject > jacobiSvd(unsigned int computationOptions=0) const
const FullPivHouseholderQR< PlainObject > fullPivHouseholderQr() const
const PartialPivLU< PlainObject > lu() const
Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
Expression of one (or a set of) homogeneous vector(s)
EIGEN_DEVICE_FUNC Derived & lazyAssign(const DenseBase< OtherDerived > &other)