Base class for all dense matrices, vectors, and arrays. More...
Public Types | |
enum | { RowsAtCompileTime , ColsAtCompileTime , SizeAtCompileTime , MaxRowsAtCompileTime , MaxColsAtCompileTime , MaxSizeAtCompileTime , IsVectorAtCompileTime , NumDimensions , Flags , IsRowMajor , InnerSizeAtCompileTime , InnerStrideAtCompileTime , OuterStrideAtCompileTime } |
enum | { IsPlainObjectBase } |
typedef DenseCoeffsBase< Derived, internal::accessors_level< Derived >::value > | Base |
typedef Base::CoeffReturnType | CoeffReturnType |
typedef VectorwiseOp< Derived, Vertical > | ColwiseReturnType |
typedef random_access_iterator_type | const_iterator |
typedef const VectorwiseOp< const Derived, Vertical > | ConstColwiseReturnType |
typedef const Reverse< const Derived, BothDirections > | ConstReverseReturnType |
typedef const VectorwiseOp< const Derived, Horizontal > | ConstRowwiseReturnType |
typedef Transpose< const Derived > | ConstTransposeReturnType |
typedef internal::add_const_on_value_type_t< typename internal::eval< Derived >::type > | EvalReturnType |
typedef random_access_iterator_type | iterator |
typedef internal::find_best_packet< Scalar, SizeAtCompileTime >::type | PacketScalar |
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 >::MaxColsAtCompileTime > | PlainArray |
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 >::MaxColsAtCompileTime > | PlainMatrix |
typedef std::conditional_t< internal::is_same< typename internal::traits< Derived >::XprKind, MatrixXpr >::value, PlainMatrix, PlainArray > | PlainObject |
The plain matrix or array type corresponding to this expression. More... | |
typedef CwiseNullaryOp< internal::scalar_random_op< Scalar >, PlainObject > | RandomReturnType |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef Reverse< Derived, BothDirections > | ReverseReturnType |
typedef VectorwiseOp< Derived, Horizontal > | RowwiseReturnType |
typedef internal::traits< Derived >::Scalar | Scalar |
typedef internal::traits< Derived >::StorageIndex | StorageIndex |
The type used to store indices. More... | |
typedef internal::traits< Derived >::StorageKind | StorageKind |
typedef Transpose< Derived > | TransposeReturnType |
typedef Scalar | value_type |
Public Types inherited from Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors > | |
typedef DenseCoeffsBase< Derived, WriteAccessors > | Base |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef internal::traits< Derived >::Scalar | Scalar |
Public Types inherited from Eigen::DenseCoeffsBase< Derived, WriteAccessors > | |
typedef DenseCoeffsBase< Derived, ReadOnlyAccessors > | Base |
typedef internal::packet_traits< Scalar >::type | PacketScalar |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef internal::traits< Derived >::Scalar | Scalar |
typedef internal::traits< Derived >::StorageKind | StorageKind |
Public Types inherited from Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors > | |
typedef EigenBase< Derived > | Base |
typedef std::conditional_t< bool(internal::traits< Derived >::Flags &LvalueBit), const Scalar &, std::conditional_t< internal::is_arithmetic< Scalar >::value, Scalar, const Scalar > > | CoeffReturnType |
typedef internal::add_const_on_value_type_if_arithmetic< typename internal::packet_traits< Scalar >::type >::type | PacketReturnType |
typedef internal::packet_traits< Scalar >::type | PacketScalar |
typedef internal::traits< Derived >::Scalar | Scalar |
typedef internal::traits< Derived >::StorageKind | StorageKind |
Public Types inherited from Eigen::EigenBase< Derived > | |
typedef Eigen::Index | Index |
The interface type of indices. More... | |
typedef internal::traits< Derived >::StorageKind | StorageKind |
Public Member Functions | |
bool | all () const |
bool | allFinite () const |
bool | any () const |
iterator | begin () |
const_iterator | begin () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
ColwiseReturnType | colwise () |
ConstColwiseReturnType | colwise () const |
Index | count () const |
iterator | end () |
const_iterator | end () const |
EvalReturnType | eval () const |
template<typename Dest > | |
void | evalTo (Dest &) const |
void | fill (const Scalar &value) |
template<unsigned int Added, unsigned int Removed> | |
EIGEN_DEPRECATED const Derived & | flagged () const |
ForceAlignedAccess< Derived > | forceAlignedAccess () |
const ForceAlignedAccess< Derived > | forceAlignedAccess () const |
template<bool Enable> | |
std::conditional_t< Enable, ForceAlignedAccess< Derived >, Derived & > | forceAlignedAccessIf () |
template<bool Enable> | |
const std::conditional_t< Enable, ForceAlignedAccess< Derived >, Derived & > | forceAlignedAccessIf () const |
const WithFormat< Derived > | format (const IOFormat &fmt) const |
bool | hasNaN () const |
EIGEN_CONSTEXPR Index | innerSize () const |
template<typename OtherDerived > | |
bool | isApprox (const DenseBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
bool | isApproxToConstant (const Scalar &value, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
bool | isConstant (const Scalar &value, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
template<typename OtherDerived > | |
bool | isMuchSmallerThan (const DenseBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
bool | isMuchSmallerThan (const RealScalar &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
template<typename Derived > | |
bool | isMuchSmallerThan (const typename NumTraits< Scalar >::Real &other, const RealScalar &prec) const |
bool | isOnes (const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
bool | isZero (const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
template<typename OtherDerived > | |
Derived & | lazyAssign (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
EIGEN_DEPRECATED Derived & | lazyAssign (const DenseBase< OtherDerived > &other) |
template<int p> | |
RealScalar | lpNorm () const |
template<int NaNPropagation> | |
internal::traits< Derived >::Scalar | maxCoeff () const |
internal::traits< Derived >::Scalar | maxCoeff () const |
template<int NaNPropagation, typename IndexType > | |
internal::traits< Derived >::Scalar | maxCoeff (IndexType *index) const |
template<typename IndexType > | |
internal::traits< Derived >::Scalar | maxCoeff (IndexType *index) const |
template<int NaNPropagation, typename IndexType > | |
internal::traits< Derived >::Scalar | maxCoeff (IndexType *row, IndexType *col) const |
template<typename IndexType > | |
internal::traits< Derived >::Scalar | maxCoeff (IndexType *row, IndexType *col) const |
Scalar | mean () const |
template<int NaNPropagation> | |
internal::traits< Derived >::Scalar | minCoeff () const |
internal::traits< Derived >::Scalar | minCoeff () const |
template<int NaNPropagation, typename IndexType > | |
internal::traits< Derived >::Scalar | minCoeff (IndexType *index) const |
template<typename IndexType > | |
internal::traits< Derived >::Scalar | minCoeff (IndexType *index) const |
template<int NaNPropagation, typename IndexType > | |
internal::traits< Derived >::Scalar | minCoeff (IndexType *row, IndexType *col) const |
template<typename IndexType > | |
internal::traits< Derived >::Scalar | minCoeff (IndexType *row, IndexType *col) const |
const NestByValue< Derived > | nestByValue () const |
Derived & | operator*= (const Scalar &other) |
template<typename OtherDerived > | |
Derived & | operator+= (const EigenBase< OtherDerived > &other) |
template<typename OtherDerived > | |
Derived & | operator-= (const EigenBase< OtherDerived > &other) |
Derived & | operator/= (const Scalar &other) |
template<typename OtherDerived > | |
CommaInitializer< Derived > | operator<< (const DenseBase< OtherDerived > &other) |
CommaInitializer< Derived > | operator<< (const Scalar &s) |
Derived & | operator= (const DenseBase &other) |
template<typename OtherDerived > | |
Derived & | operator= (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
Derived & | operator= (const EigenBase< OtherDerived > &other) |
Copies the generic expression other into *this. More... | |
template<typename OtherDerived > | |
Derived & | operator= (const ReturnByValue< OtherDerived > &func) |
EIGEN_CONSTEXPR Index | outerSize () const |
Scalar | prod () const |
template<typename BinaryOp > | |
Scalar | redux (const BinaryOp &func) const |
template<typename Func > | |
internal::traits< Derived >::Scalar | redux (const Func &func) const |
template<int RowFactor, int ColFactor> | |
const Replicate< Derived, RowFactor, ColFactor > | replicate () const |
const Replicate< Derived, Dynamic, Dynamic > | replicate (Index rowFactor, Index colFactor) const |
void | resize (Index newSize) |
void | resize (Index rows, Index cols) |
ReverseReturnType | reverse () |
ConstReverseReturnType | reverse () const |
void | reverseInPlace () |
RowwiseReturnType | rowwise () |
ConstRowwiseReturnType | rowwise () const |
template<typename ThenDerived , typename ElseDerived > | |
CwiseTernaryOp< internal::scalar_boolean_select_op< typename DenseBase< ThenDerived >::Scalar, typename DenseBase< ElseDerived >::Scalar, Scalar >, ThenDerived, ElseDerived, Derived > | select (const DenseBase< ThenDerived > &thenMatrix, const DenseBase< ElseDerived > &elseMatrix) const |
template<typename ThenDerived , typename ElseDerived > | |
CwiseTernaryOp< internal::scalar_boolean_select_op< typename DenseBase< ThenDerived >::Scalar, typename DenseBase< ElseDerived >::Scalar, typename DenseBase< Derived >::Scalar >, ThenDerived, ElseDerived, Derived > | select (const DenseBase< ThenDerived > &thenMatrix, const DenseBase< ElseDerived > &elseMatrix) const |
template<typename ThenDerived > | |
CwiseTernaryOp< internal::scalar_boolean_select_op< typename DenseBase< ThenDerived >::Scalar, typename DenseBase< ThenDerived >::Scalar, Scalar >, ThenDerived, typename DenseBase< ThenDerived >::ConstantReturnType, Derived > | select (const DenseBase< ThenDerived > &thenMatrix, const typename DenseBase< ThenDerived >::Scalar &elseScalar) const |
template<typename ThenDerived > | |
CwiseTernaryOp< internal::scalar_boolean_select_op< typename DenseBase< ThenDerived >::Scalar, typename DenseBase< ThenDerived >::Scalar, typename DenseBase< Derived >::Scalar >, ThenDerived, typename DenseBase< ThenDerived >::ConstantReturnType, Derived > | select (const DenseBase< ThenDerived > &thenMatrix, const typename DenseBase< ThenDerived >::Scalar &elseScalar) const |
template<typename ElseDerived > | |
CwiseTernaryOp< internal::scalar_boolean_select_op< typename DenseBase< ElseDerived >::Scalar, typename DenseBase< ElseDerived >::Scalar, Scalar >, typename DenseBase< ElseDerived >::ConstantReturnType, ElseDerived, Derived > | select (const typename DenseBase< ElseDerived >::Scalar &thenScalar, const DenseBase< ElseDerived > &elseMatrix) const |
template<typename ElseDerived > | |
CwiseTernaryOp< internal::scalar_boolean_select_op< typename DenseBase< ElseDerived >::Scalar, typename DenseBase< ElseDerived >::Scalar, typename DenseBase< Derived >::Scalar >, typename DenseBase< ElseDerived >::ConstantReturnType, ElseDerived, Derived > | select (const typename DenseBase< ElseDerived >::Scalar &thenScalar, const DenseBase< ElseDerived > &elseMatrix) const |
Derived & | setConstant (const Scalar &value) |
Derived & | setEqualSpaced (const Scalar &low, const Scalar &step) |
Derived & | setEqualSpaced (Index size, const Scalar &low, const Scalar &step) |
Derived & | setLinSpaced (const Scalar &low, const Scalar &high) |
Sets a linearly spaced vector. More... | |
Derived & | setLinSpaced (Index size, const Scalar &low, const Scalar &high) |
Sets a linearly spaced vector. More... | |
Derived & | setOnes () |
Derived & | setRandom () |
Derived & | setZero () |
Scalar | sum () const |
template<typename OtherDerived > | |
void | swap (const DenseBase< OtherDerived > &other) |
template<typename OtherDerived > | |
void | swap (PlainObjectBase< OtherDerived > &other) |
Scalar | trace () const |
TransposeReturnType | transpose () |
const ConstTransposeReturnType | transpose () const |
void | transposeInPlace () |
CoeffReturnType | value () const |
template<typename Visitor > | |
void | visit (Visitor &func) const |
Public Member Functions inherited from Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors > | |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | colStride () const EIGEN_NOEXCEPT |
Derived & | derived () |
const Derived & | derived () const |
EIGEN_CONSTEXPR Index | innerStride () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | outerStride () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | rowStride () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | stride () const EIGEN_NOEXCEPT |
Public Member Functions inherited from Eigen::DenseCoeffsBase< Derived, WriteAccessors > | |
Scalar & | coeffRef (Index index) |
Scalar & | coeffRef (Index row, Index col) |
Scalar & | coeffRefByOuterInner (Index outer, Index inner) |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
Derived & | derived () |
const Derived & | derived () const |
Scalar & | operator() (Index index) |
Scalar & | operator() (Index row, Index col) |
Scalar & | operator[] (Index index) |
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
Scalar & | w () |
Scalar & | x () |
Scalar & | y () |
Scalar & | z () |
Public Member Functions inherited from Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors > | |
CoeffReturnType | coeff (Index index) const |
CoeffReturnType | coeff (Index row, Index col) const |
CoeffReturnType | coeffByOuterInner (Index outer, Index inner) const |
Index | colIndexByOuterInner (Index outer, Index inner) const |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
Derived & | derived () |
const Derived & | derived () const |
CoeffReturnType | operator() (Index index) const |
CoeffReturnType | operator() (Index row, Index col) const |
CoeffReturnType | operator[] (Index index) const |
template<int LoadMode> | |
PacketReturnType | packet (Index index) const |
template<int LoadMode> | |
PacketReturnType | packet (Index row, Index col) const |
template<int LoadMode> | |
PacketReturnType | packetByOuterInner (Index outer, Index inner) const |
Index | rowIndexByOuterInner (Index outer, Index inner) const |
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
CoeffReturnType | w () const |
CoeffReturnType | x () const |
CoeffReturnType | y () const |
CoeffReturnType | z () const |
Public Member Functions inherited from Eigen::EigenBase< Derived > | |
template<typename Dest > | |
void | addTo (Dest &dst) const |
template<typename Dest > | |
void | applyThisOnTheLeft (Dest &dst) const |
template<typename Dest > | |
void | applyThisOnTheRight (Dest &dst) const |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
Derived & | const_cast_derived () const |
const Derived & | const_derived () const |
Derived & | derived () |
const Derived & | derived () const |
template<typename Dest > | |
void | evalTo (Dest &dst) const |
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
template<typename Dest > | |
void | subTo (Dest &dst) const |
Static Public Member Functions | |
static const ConstantReturnType | Constant (const Scalar &value) |
static const ConstantReturnType | Constant (Index rows, Index cols, const Scalar &value) |
static const ConstantReturnType | Constant (Index size, const Scalar &value) |
static const RandomAccessEqualSpacedReturnType | EqualSpaced (const Scalar &low, const Scalar &step) |
static const RandomAccessEqualSpacedReturnType | EqualSpaced (Index size, const Scalar &low, const Scalar &step) |
static const RandomAccessLinSpacedReturnType | LinSpaced (const Scalar &low, const Scalar &high) |
Sets a linearly spaced vector. More... | |
static const RandomAccessLinSpacedReturnType | LinSpaced (Index size, const Scalar &low, const Scalar &high) |
Sets a linearly spaced vector. More... | |
static EIGEN_DEPRECATED const RandomAccessLinSpacedReturnType | LinSpaced (Sequential_t, const Scalar &low, const Scalar &high) |
static EIGEN_DEPRECATED const RandomAccessLinSpacedReturnType | LinSpaced (Sequential_t, Index size, const Scalar &low, const Scalar &high) |
template<typename CustomNullaryOp > | |
static const CwiseNullaryOp< CustomNullaryOp, PlainObject > | NullaryExpr (const CustomNullaryOp &func) |
template<typename CustomNullaryOp > | |
static const CwiseNullaryOp< CustomNullaryOp, PlainObject > | NullaryExpr (Index rows, Index cols, const CustomNullaryOp &func) |
template<typename CustomNullaryOp > | |
static const CwiseNullaryOp< CustomNullaryOp, PlainObject > | NullaryExpr (Index size, const CustomNullaryOp &func) |
static const ConstantReturnType | Ones () |
static const ConstantReturnType | Ones (Index rows, Index cols) |
static const ConstantReturnType | Ones (Index size) |
static const RandomReturnType | Random () |
static const RandomReturnType | Random (Index rows, Index cols) |
static const RandomReturnType | Random (Index size) |
static const ConstantReturnType | Zero () |
static const ConstantReturnType | Zero (Index rows, Index cols) |
static const ConstantReturnType | Zero (Index size) |
Protected Member Functions | |
constexpr | DenseBase () |
Protected Member Functions inherited from Eigen::DenseCoeffsBase< Derived, ReadOnlyAccessors > | |
void | coeffRef () |
void | coeffRefByOuterInner () |
void | colStride () |
void | copyCoeff () |
void | copyCoeffByOuterInner () |
void | copyPacket () |
void | copyPacketByOuterInner () |
void | innerStride () |
void | outerStride () |
void | rowStride () |
void | stride () |
void | writePacket () |
void | writePacketByOuterInner () |
Private Member Functions | |
template<typename OtherDerived > | |
DenseBase (const DenseBase< OtherDerived > &) | |
DenseBase (int) | |
DenseBase (int, int) | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename Derived > | |
std::ostream & | operator<< (std::ostream &s, const DenseBase< Derived > &m) |
Base class for all dense matrices, vectors, and arrays.
This class is the base that is inherited by all dense objects (matrix, vector, arrays, and related expression types). The common Eigen API for dense objects is contained in this class.
Derived | is the derived type, e.g., a matrix type or an expression. |
This class can be extended with the help of the plugin mechanism described on the page Extending MatrixBase (and other classes) by defining the preprocessor symbol EIGEN_DENSEBASE_PLUGIN
.
Definition at line 36 of file DenseBase.h.
typedef DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value> Eigen::DenseBase< Derived >::Base |
Definition at line 69 of file DenseBase.h.
typedef Base::CoeffReturnType Eigen::DenseBase< Derived >::CoeffReturnType |
Definition at line 91 of file DenseBase.h.
typedef VectorwiseOp<Derived, Vertical> Eigen::DenseBase< Derived >::ColwiseReturnType |
Definition at line 537 of file DenseBase.h.
typedef random_access_iterator_type Eigen::DenseBase< Derived >::const_iterator |
This is the const version of iterator (aka read-only)
Definition at line 630 of file DenseBase.h.
typedef const VectorwiseOp<const Derived, Vertical> Eigen::DenseBase< Derived >::ConstColwiseReturnType |
Definition at line 538 of file DenseBase.h.
typedef const Reverse<const Derived, BothDirections> Eigen::DenseBase< Derived >::ConstReverseReturnType |
Definition at line 614 of file DenseBase.h.
typedef const VectorwiseOp<const Derived, Horizontal> Eigen::DenseBase< Derived >::ConstRowwiseReturnType |
Definition at line 536 of file DenseBase.h.
typedef Transpose<const Derived> Eigen::DenseBase< Derived >::ConstTransposeReturnType |
Definition at line 318 of file DenseBase.h.
typedef internal::add_const_on_value_type_t<typename internal::eval<Derived>::type> Eigen::DenseBase< Derived >::EvalReturnType |
Definition at line 396 of file DenseBase.h.
typedef random_access_iterator_type Eigen::DenseBase< Derived >::iterator |
STL-like RandomAccessIterator iterator type as returned by the begin() and end() methods.
Definition at line 628 of file DenseBase.h.
typedef internal::find_best_packet<Scalar,SizeAtCompileTime>::type Eigen::DenseBase< Derived >::PacketScalar |
Definition at line 173 of file DenseBase.h.
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>::MaxColsAtCompileTime > Eigen::DenseBase< Derived >::PlainArray |
The plain array type corresponding to this expression.
Definition at line 195 of file DenseBase.h.
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>::MaxColsAtCompileTime > Eigen::DenseBase< Derived >::PlainMatrix |
The plain matrix type corresponding to this expression.
Definition at line 185 of file DenseBase.h.
typedef std::conditional_t<internal::is_same<typename internal::traits<Derived>::XprKind,MatrixXpr >::value, PlainMatrix, PlainArray> Eigen::DenseBase< Derived >::PlainObject |
The plain matrix or array type corresponding to this expression.
This is not necessarily exactly the return type of eval(). In the case of plain matrices, the return type of eval() is a const reference to a matrix, not a matrix! It is however guaranteed that the return type of eval() is either PlainObject or const PlainObject&.
Definition at line 204 of file DenseBase.h.
typedef CwiseNullaryOp<internal::scalar_random_op<Scalar>,PlainObject> Eigen::DenseBase< Derived >::RandomReturnType |
Definition at line 565 of file DenseBase.h.
typedef NumTraits<Scalar>::Real Eigen::DenseBase< Derived >::RealScalar |
Definition at line 68 of file DenseBase.h.
typedef Reverse<Derived, BothDirections> Eigen::DenseBase< Derived >::ReverseReturnType |
Definition at line 613 of file DenseBase.h.
typedef VectorwiseOp<Derived, Horizontal> Eigen::DenseBase< Derived >::RowwiseReturnType |
Definition at line 535 of file DenseBase.h.
typedef internal::traits<Derived>::Scalar Eigen::DenseBase< Derived >::Scalar |
The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc.
Definition at line 61 of file DenseBase.h.
typedef internal::traits<Derived>::StorageIndex Eigen::DenseBase< Derived >::StorageIndex |
The type used to store indices.
This typedef is relevant for types that store multiple indices such as PermutationMatrix or Transpositions, otherwise it defaults to Eigen::Index
Definition at line 58 of file DenseBase.h.
typedef internal::traits<Derived>::StorageKind Eigen::DenseBase< Derived >::StorageKind |
Definition at line 50 of file DenseBase.h.
typedef Transpose<Derived> Eigen::DenseBase< Derived >::TransposeReturnType |
Definition at line 315 of file DenseBase.h.
typedef Scalar Eigen::DenseBase< Derived >::value_type |
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
Definition at line 66 of file DenseBase.h.
anonymous enum |
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. |
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. |
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.
|
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. |
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. |
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. |
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). |
NumDimensions | This value is equal to Tensor::NumDimensions, i.e. 0 for scalars, 1 for vectors, and 2 for matrices. |
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 |
Definition at line 93 of file DenseBase.h.
anonymous enum |
|
inlineconstexprprotected |
Default constructor. Do nothing.
Definition at line 683 of file DenseBase.h.
|
explicitprivate |
|
private |
|
explicitprivate |
|
inline |
Example:
Output:
Is ( 0.68 -0.211 0.566) inside the box: 0 Is (0.597 0.823 0.605) inside the box: 1
Definition at line 788 of file Visitor.h.
|
inline |
|
inline |
|
inline |
returns an iterator to the first element of the 1D vector or array This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Definition at line 410 of file StlIterators.h.
|
inline |
|
inline |
returns a read-only const_iterator to the first element of the 1D vector or array This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Definition at line 428 of file StlIterators.h.
|
inline |
returns a read-only const_iterator to the element following the last element of the 1D vector or array This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Definition at line 457 of file StlIterators.h.
|
inline |
Definition at line 764 of file VectorwiseOp.h.
|
inline |
Example:
Output:
Here is the matrix m: 0.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the sum of each column: 1.04 0.815 -0.238 Here is the maximum absolute value of each column: 0.68 0.823 0.536
Definition at line 560 of file DenseBase.h.
|
inlinestatic |
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.
Definition at line 229 of file CwiseNullaryOp.h.
|
inlinestatic |
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.
Definition at line 191 of file CwiseNullaryOp.h.
|
inlinestatic |
The parameter size is the size of the returned vector. Must be compatible with this DenseBase type.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
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.
Definition at line 213 of file CwiseNullaryOp.h.
Index Eigen::DenseBase< Derived >::count |
|
inline |
returns an iterator to the element following the last element of the 1D vector or array This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Definition at line 439 of file StlIterators.h.
|
inline |
|
inlinestatic |
Definition at line 318 of file CwiseNullaryOp.h.
|
inlinestatic |
Definition at line 311 of file CwiseNullaryOp.h.
|
inline |
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.
Definition at line 405 of file DenseBase.h.
|
inline |
Definition at line 675 of file DenseBase.h.
|
inline |
Alias for setConstant(): sets all coefficients in this expression to val.
Definition at line 351 of file CwiseNullaryOp.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
See class IOFormat for some examples.
Definition at line 517 of file DenseBase.h.
|
inline |
|
inline |
Definition at line 224 of file DenseBase.h.
bool Eigen::DenseBase< Derived >::isApprox | ( | const DenseBase< OtherDerived > & | other, |
const RealScalar & | prec = NumTraits<Scalar>::dummy_precision() |
||
) | const |
true
if *this
is approximately equal to other, within the precision determined by prec.\[ \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).*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.Definition at line 105 of file Fuzzy.h.
bool Eigen::DenseBase< Derived >::isApproxToConstant | ( | const Scalar & | val, |
const RealScalar & | prec = NumTraits<Scalar>::dummy_precision() |
||
) | const |
Definition at line 325 of file CwiseNullaryOp.h.
bool Eigen::DenseBase< Derived >::isConstant | ( | const Scalar & | val, |
const RealScalar & | prec = NumTraits<Scalar>::dummy_precision() |
||
) | const |
This is just an alias for isApproxToConstant().
Definition at line 340 of file CwiseNullaryOp.h.
bool Eigen::DenseBase< Derived >::isMuchSmallerThan | ( | const DenseBase< OtherDerived > & | other, |
const RealScalar & | prec = NumTraits<Scalar>::dummy_precision() |
||
) | const |
true
if the norm of *this
is much smaller than the norm of other, within the precision determined by prec.\[ \Vert v \Vert \leqslant p\,\Vert w\Vert. \]
For matrices, the comparison is done using the Hilbert-Schmidt norm.Definition at line 147 of file Fuzzy.h.
bool Eigen::DenseBase< Derived >::isMuchSmallerThan | ( | const RealScalar & | other, |
const RealScalar & | prec = NumTraits< Scalar >::dummy_precision() |
||
) | const |
bool Eigen::DenseBase< Derived >::isMuchSmallerThan | ( | const typename NumTraits< Scalar >::Real & | other, |
const RealScalar & | prec | ||
) | const |
true
if the norm of *this
is much smaller than other, within the precision determined by prec.\[ \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.
Definition at line 127 of file Fuzzy.h.
bool Eigen::DenseBase< Derived >::isOnes | ( | const RealScalar & | prec = NumTraits<Scalar>::dummy_precision() | ) | const |
Example:
Output:
Here's the matrix m: 1 1 1 1 1 1 1 1 1 m.isOnes() returns: 0 m.isOnes(1e-3) returns: 1
Definition at line 713 of file CwiseNullaryOp.h.
bool Eigen::DenseBase< Derived >::isZero | ( | const RealScalar & | prec = NumTraits<Scalar>::dummy_precision() | ) | const |
Example:
Output:
Here's the matrix m: 0 0 0.0001 0 0 0 0 0 0 m.isZero() returns: 0 m.isZero(1e-3) returns: 1
Definition at line 557 of file CwiseNullaryOp.h.
|
inline |
Definition at line 22 of file Assign.h.
EIGEN_DEPRECATED Derived& Eigen::DenseBase< Derived >::lazyAssign | ( | const DenseBase< OtherDerived > & | other | ) |
|
inlinestatic |
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.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Example:
Output:
7 8 9 10 0 0.25 0.5 0.75 1
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:
Even spacing inputs: 1 1 2 2 3 3 4 4 1 2 3 4 5 6 7 8 1 3 5 7 9 11 13 15 Uneven spacing inputs: 1 1 2 2 3 3 4 4 1 2 3 4 5 6 7 8 1 3 5 7 9 11 13 15
Definition at line 302 of file CwiseNullaryOp.h.
|
inlinestatic |
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.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Example:
Output:
7 8 9 10 0 0.25 0.5 0.75 1
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:
Even spacing inputs: 1 1 2 2 3 3 4 4 1 2 3 4 5 6 7 8 1 3 5 7 9 11 13 15 Uneven spacing inputs: 1 1 2 2 3 3 4 4 1 2 3 4 5 6 7 8 1 3 5 7 9 11 13 15
Definition at line 290 of file CwiseNullaryOp.h.
|
inlinestatic |
Definition at line 258 of file CwiseNullaryOp.h.
|
inlinestatic |
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Example:
Output:
7 8 9 10 0 0.25 0.5 0.75 1
Definition at line 246 of file CwiseNullaryOp.h.
RealScalar Eigen::DenseBase< Derived >::lpNorm | ( | ) | const |
|
inline |
*this
. In case *this
contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN Definition at line 533 of file Redux.h.
|
inline |
Definition at line 463 of file DenseBase.h.
internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::maxCoeff | ( | IndexType * | index | ) | const |
In case *this
contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN
Definition at line 769 of file Visitor.h.
|
inline |
Definition at line 498 of file DenseBase.h.
internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::maxCoeff | ( | IndexType * | rowId, |
IndexType * | colId | ||
) | const |
In case *this
contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN
Definition at line 744 of file Visitor.h.
|
inline |
Definition at line 488 of file DenseBase.h.
|
inline |
|
inline |
*this
. In case *this
contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is minimum of elements that are not NaN Definition at line 518 of file Redux.h.
|
inline |
Definition at line 460 of file DenseBase.h.
internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::minCoeff | ( | IndexType * | index | ) | const |
In case *this
contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN
Definition at line 718 of file Visitor.h.
|
inline |
Definition at line 493 of file DenseBase.h.
internal::traits< Derived >::Scalar Eigen::DenseBase< Derived >::minCoeff | ( | IndexType * | rowId, |
IndexType * | colId | ||
) | const |
In case *this
contains NaN, NaNPropagation determines the behavior: NaNPropagation == PropagateFast : undefined NaNPropagation == PropagateNaN : result is NaN NaNPropagation == PropagateNumbers : result is maximum of elements that are not NaN
Definition at line 693 of file Visitor.h.
|
inline |
Definition at line 483 of file DenseBase.h.
|
inline |
Definition at line 79 of file NestByValue.h.
|
inlinestatic |
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.
Definition at line 171 of file CwiseNullaryOp.h.
|
inlinestatic |
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.
Definition at line 116 of file CwiseNullaryOp.h.
|
inlinestatic |
The parameter size is the size of the returned vector. Must be compatible with this MatrixBase type.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
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:
2 3 1 4 3 4 4 3 2 3
Definition at line 147 of file CwiseNullaryOp.h.
|
inlinestatic |
This variant is only for fixed-size MatrixBase types. For dynamic-size types, you need to use the variants taking size arguments.
Example:
Output:
1 1 1 1 6 6 6 6
Definition at line 699 of file CwiseNullaryOp.h.
|
inlinestatic |
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:
1 1 1 1 1 1
Definition at line 659 of file CwiseNullaryOp.h.
|
inlinestatic |
The parameter newSize is the size of the returned vector. Must be compatible with this MatrixBase type.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
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:
6 6 6 6 1 1
Definition at line 682 of file CwiseNullaryOp.h.
|
inline |
Definition at line 20 of file SelfCwiseBinaryOp.h.
Derived & Eigen::DenseBase< Derived >::operator+= | ( | const EigenBase< OtherDerived > & | other | ) |
Definition at line 145 of file EigenBase.h.
Derived & Eigen::DenseBase< Derived >::operator-= | ( | const EigenBase< OtherDerived > & | other | ) |
Definition at line 154 of file EigenBase.h.
|
inline |
Definition at line 41 of file SelfCwiseBinaryOp.h.
|
inline |
Definition at line 1 of file CommaInitializer.h.
|
inline |
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:
1 2 3 4 5 6 7 8 9 10 11 0 12 13 0 0 0 1 14 15 16 14 5 6 15 8 9
Definition at line 1 of file CommaInitializer.h.
|
inline |
Special case of the template operator=, in order to prevent the compiler from generating a default operator= (issue hit with g++ 4.1)
|
inline |
Copies other into *this.
Derived & Eigen::DenseBase< Derived >::operator= | ( | const EigenBase< OtherDerived > & | other | ) |
Copies the generic expression other into *this.
Implementation of matrix base methods
The expression must provide a (templated) evalTo(Derived& dst) const function which does the actual job. In practice, this allows any user to write its own special matrix without having to modify MatrixBase
Definition at line 136 of file EigenBase.h.
Derived & Eigen::DenseBase< Derived >::operator= | ( | const ReturnByValue< OtherDerived > & | func | ) |
Definition at line 86 of file ReturnByValue.h.
|
inline |
Definition at line 212 of file DenseBase.h.
|
inline |
Example:
Output:
Here is the matrix m: 0.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the product of all the coefficients: 0.0019
Definition at line 580 of file Redux.h.
|
inlinestatic |
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:
700 600 -200 600
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.
Definition at line 114 of file Random.h.
|
inlinestatic |
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.
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:
7 6 9 -2 6 -6
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.
|
inlinestatic |
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.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
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:
7 -2
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.
Scalar Eigen::DenseBase< Derived >::redux | ( | const BinaryOp & | func | ) | const |
|
inline |
Part 4 : public API
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.
Definition at line 496 of file Redux.h.
const Replicate< Derived, RowFactor, ColFactor > Eigen::DenseBase< Derived >::replicate |
*this
Example:
Output:
Here is the matrix m: 7 6 9 -2 6 -6 m.replicate<3,2>() = ... 7 6 9 7 6 9 -2 6 -6 -2 6 -6 7 6 9 7 6 9 -2 6 -6 -2 6 -6 7 6 9 7 6 9 -2 6 -6 -2 6 -6
Definition at line 121 of file Replicate.h.
|
inline |
*this
Example:
Output:
Here is the vector v: 7 -2 6 v.replicate(2,5) = ... 7 7 7 7 7 -2 -2 -2 -2 -2 6 6 6 6 6 7 7 7 7 7 -2 -2 -2 -2 -2 6 6 6 6 6
Definition at line 608 of file DenseBase.h.
|
inline |
Only plain matrices/arrays, not expressions, may be resized; therefore the only useful resize methods are Matrix::resize() and Array::resize(). The present method only asserts that the new size equals the old size, and does nothing else.
Definition at line 235 of file DenseBase.h.
|
inline |
Only plain matrices/arrays, not expressions, may be resized; therefore the only useful resize methods are Matrix::resize() and Array::resize(). The present method only asserts that the new size equals the old size, and does nothing else.
Definition at line 246 of file DenseBase.h.
|
inline |
Example:
Output:
Here is the matrix m: 7 6 -3 1 -2 9 6 0 6 -6 -5 3 Here is the reverse of m: 3 -5 -6 6 0 6 9 -2 1 -3 6 7 Here is the coefficient (1,0) in the reverse of m: 0 Let us overwrite this coefficient with the value 4. Now the matrix m is: 7 6 -3 1 -2 9 6 4 6 -6 -5 3
Definition at line 122 of file Reverse.h.
|
inline |
This is the const version of reverse().
Definition at line 618 of file DenseBase.h.
|
inline |
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:
Definition at line 143 of file Reverse.h.
|
inline |
Definition at line 778 of file VectorwiseOp.h.
|
inline |
Example:
Output:
Here is the matrix m: 0.68 0.597 -0.33 -0.211 0.823 0.536 0.566 -0.605 -0.444 Here is the sum of each row: 0.948 1.15 -0.483 Here is the maximum absolute value of each row: 0.68 0.823 0.605
Definition at line 548 of file DenseBase.h.
|
inline |
|
inline |
*this
(i,j) != Scalar(0), and elseMatrix(i,j) otherwise.Example:
Output:
1 2 3 4 -5 -6 -7 -8 -9
Definition at line 131 of file Select.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets all coefficients in this expression to value val.
Definition at line 361 of file CwiseNullaryOp.h.
|
inline |
Definition at line 479 of file CwiseNullaryOp.h.
|
inline |
Definition at line 473 of file CwiseNullaryOp.h.
|
inline |
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.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
For integer scalar types, do not miss the explanations on the definition of even spacing .
Definition at line 466 of file CwiseNullaryOp.h.
|
inline |
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.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
Example:
Output:
0.5 0.75 1 1.25 1.5
For integer scalar types, do not miss the explanations on the definition of even spacing .
Definition at line 446 of file CwiseNullaryOp.h.
|
inline |
Sets all coefficients in this expression to one.
Example:
Output:
7 9 -5 -3 1 1 1 1 6 -3 0 9 6 6 3 9
Definition at line 727 of file CwiseNullaryOp.h.
|
inline |
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.
Example:
Output:
0 7 0 0 0 -2 0 0 0 6 0 0 0 6 0 0
|
inline |
Sets all coefficients in this expression to zero.
Example:
Output:
7 9 -5 -3 0 0 0 0 6 -3 0 9 6 6 3 9
Definition at line 575 of file CwiseNullaryOp.h.
|
inline |
|
inline |
swaps *this with the expression other.
Definition at line 418 of file DenseBase.h.
|
inline |
Scalar Eigen::DenseBase< Derived >::trace | ( | ) | const |
|
inline |
Example:
Output:
Here is the matrix m: 7 6 -2 6 Here is the transpose of m: 7 -2 6 6 Here is the coefficient (1,0) in the transpose of m: 6 Let us overwrite this coefficient with the value 0. Now the matrix m is: 7 0 -2 6
Definition at line 184 of file Transpose.h.
|
inline |
This is the const version of transpose().
Make sure you read the warning for transpose() !
Definition at line 197 of file Transpose.h.
|
inline |
This is the "in place" version of transpose(): it replaces *this
by its own transpose. Thus, doing
has the same effect on m as doing
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().
*this
must be a resizable matrix. This excludes (non-square) fixed-size matrices, block-expressions and maps.Definition at line 346 of file Transpose.h.
|
inline |
void Eigen::DenseBase< Derived >::visit | ( | Visitor & | visitor | ) | const |
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:
Definition at line 413 of file Visitor.h.
|
inlinestatic |
This variant is only for fixed-size MatrixBase types. For dynamic-size types, you need to use the variants taking size arguments.
Example:
Output:
0 0 0 0 0 0 0 0
Definition at line 543 of file CwiseNullaryOp.h.
|
inlinestatic |
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:
0 0 0 0 0 0
Definition at line 503 of file CwiseNullaryOp.h.
|
inlinestatic |
The parameter size is the size of the returned vector. Must be compatible with this MatrixBase type.
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
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:
0 0 0 0 0 0
Definition at line 526 of file CwiseNullaryOp.h.
|
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.
Definition at line 249 of file IO.h.