Eigen::ArrayBase< Derived > Class Template Reference

Base class for all 1D and 2D array, and related expressions. More...

+ Inheritance diagram for Eigen::ArrayBase< Derived >:

Public Member Functions

ArrayBase< Derived > & array ()
 
const ArrayBase< Derived > & array () const
 
MatrixWrapper< Derived > matrix ()
 
const MatrixWrapper< const Derived > matrix () const
 
template<typename OtherDerived >
Derived & operator*= (const ArrayBase< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator+= (const ArrayBase< OtherDerived > &other)
 
Derived & operator+= (const Scalar &scalar)
 
template<typename OtherDerived >
Derived & operator-= (const ArrayBase< OtherDerived > &other)
 
Derived & operator-= (const Scalar &scalar)
 
template<typename OtherDerived >
Derived & operator/= (const ArrayBase< OtherDerived > &other)
 
Derived & operator= (const ArrayBase &other)
 
Derived & operator= (const Scalar &value)
 
- Public Member Functions inherited from Eigen::DenseBase< Derived >
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, Dynamicreplicate (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 >
ScalarcoeffRef (Index index)
 
ScalarcoeffRef (Index row, Index col)
 
ScalarcoeffRefByOuterInner (Index outer, Index inner)
 
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
Derived & derived ()
 
const Derived & derived () const
 
Scalaroperator() (Index index)
 
Scalaroperator() (Index row, Index col)
 
Scalaroperator[] (Index index)
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 
Scalarw ()
 
Scalarx ()
 
Scalary ()
 
Scalarz ()
 
- 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
 

Protected Member Functions

template<typename OtherDerived >
Derived & operator+= (const MatrixBase< OtherDerived > &)
 
template<typename OtherDerived >
Derived & operator-= (const MatrixBase< OtherDerived > &)
 
- Protected Member Functions inherited from Eigen::DenseBase< Derived >
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 >
 ArrayBase (const ArrayBase< OtherDerived > &)
 
 ArrayBase (Index)
 
 ArrayBase (Index, Index)
 

Related Functions

(Note that these are not member functions.)

template<typename LhsDerived , typename RhsDerived >
const std::enable_if_t< std::is_same< typename LhsDerived::Scalar, typename RhsDerived::Scalar >::value, Eigen::CwiseBinaryOp< Eigen::internal::scalar_atan2_op< typename LhsDerived::Scalar, typename RhsDerived::Scalar >, const LhsDerived, const RhsDerived > > atan2 (const Eigen::ArrayBase< LhsDerived > &x, const Eigen::ArrayBase< RhsDerived > &exponents)
 
template<typename Derived , typename ExponentDerived >
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_pow_op< typename Derived::Scalar, typename ExponentDerived::Scalar >, const Derived, const ExponentDerived > pow (const Eigen::ArrayBase< Derived > &x, const Eigen::ArrayBase< ExponentDerived > &exponents)
 
template<typename Derived , typename ScalarExponent >
const GlobalUnaryPowReturnType< Derived, ScalarExponent > pow (const Eigen::ArrayBase< Derived > &x, const ScalarExponent &exponent)
 
template<typename Scalar , typename Derived >
const CwiseBinaryOp< internal::scalar_pow_op< Scalar, Derived::Scalar >, Constant< Scalar >, Derived > pow (const Scalar &x, const Eigen::ArrayBase< Derived > &x)
 

Additional Inherited Members

- Public Types inherited from Eigen::DenseBase< Derived >
enum  {
  RowsAtCompileTime ,
  ColsAtCompileTime ,
  SizeAtCompileTime ,
  MaxRowsAtCompileTime ,
  MaxColsAtCompileTime ,
  MaxSizeAtCompileTime ,
  IsVectorAtCompileTime ,
  NumDimensions ,
  Flags ,
  IsRowMajor ,
  InnerSizeAtCompileTime ,
  InnerStrideAtCompileTime ,
  OuterStrideAtCompileTime
}
 
enum  { IsPlainObjectBase }
 
typedef DenseCoeffsBase< Derived, internal::accessors_level< Derived >::valueBase
 
typedef Base::CoeffReturnType CoeffReturnType
 
typedef VectorwiseOp< Derived, VerticalColwiseReturnType
 
typedef random_access_iterator_type const_iterator
 
typedef const VectorwiseOp< const Derived, VerticalConstColwiseReturnType
 
typedef const Reverse< const Derived, BothDirectionsConstReverseReturnType
 
typedef const VectorwiseOp< const Derived, HorizontalConstRowwiseReturnType
 
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 >::MaxColsAtCompileTimePlainArray
 
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 std::conditional_t< internal::is_same< typename internal::traits< Derived >::XprKind, MatrixXpr >::value, PlainMatrix, PlainArrayPlainObject
 The plain matrix or array type corresponding to this expression. More...
 
typedef CwiseNullaryOp< internal::scalar_random_op< Scalar >, PlainObjectRandomReturnType
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef Reverse< Derived, BothDirectionsReverseReturnType
 
typedef VectorwiseOp< Derived, HorizontalRowwiseReturnType
 
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, WriteAccessorsBase
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef internal::traits< Derived >::Scalar Scalar
 
- Public Types inherited from Eigen::DenseCoeffsBase< Derived, WriteAccessors >
typedef DenseCoeffsBase< Derived, ReadOnlyAccessorsBase
 
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
 
- Static Public Member Functions inherited from Eigen::DenseBase< Derived >
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, PlainObjectNullaryExpr (const CustomNullaryOp &func)
 
template<typename CustomNullaryOp >
static const CwiseNullaryOp< CustomNullaryOp, PlainObjectNullaryExpr (Index rows, Index cols, const CustomNullaryOp &func)
 
template<typename CustomNullaryOp >
static const CwiseNullaryOp< CustomNullaryOp, PlainObjectNullaryExpr (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)
 

Detailed Description

template<typename Derived>
class Eigen::ArrayBase< Derived >

Base class for all 1D and 2D array, and related expressions.

An array is similar to a dense vector or matrix. While matrices are mathematical objects with well defined linear algebra operators, an array is just a collection of scalar values arranged in a one or two dimensional fashion. As the main consequence, all operations applied to an array are performed coefficient wise. Furthermore, arrays support scalar math functions of the c++ standard library (e.g., std::sin(x)), and convenient constructors allowing to easily write generic code working for both scalar values and arrays.

This class is the base that is inherited by all array expression types.

Template Parameters
Derivedis the derived type, e.g., an array or an expression type.

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_ARRAYBASE_PLUGIN.

See also
class MatrixBase, The class hierarchy

Definition at line 41 of file ArrayBase.h.

Constructor & Destructor Documentation

◆ ArrayBase() [1/3]

template<typename Derived >
Eigen::ArrayBase< Derived >::ArrayBase ( Index  )
explicitprivate

◆ ArrayBase() [2/3]

template<typename Derived >
Eigen::ArrayBase< Derived >::ArrayBase ( Index  ,
Index   
)
private

◆ ArrayBase() [3/3]

template<typename Derived >
template<typename OtherDerived >
Eigen::ArrayBase< Derived >::ArrayBase ( const ArrayBase< OtherDerived > &  )
explicitprivate

Member Function Documentation

◆ array() [1/2]

template<typename Derived >
ArrayBase<Derived>& Eigen::ArrayBase< Derived >::array ( )
inline

Definition at line 143 of file ArrayBase.h.

143 { return *this; }

◆ array() [2/2]

template<typename Derived >
const ArrayBase<Derived>& Eigen::ArrayBase< Derived >::array ( ) const
inline

Definition at line 145 of file ArrayBase.h.

145 { return *this; }

◆ matrix() [1/2]

template<typename Derived >
MatrixWrapper<Derived> Eigen::ArrayBase< Derived >::matrix ( )
inline
Returns
an Matrix expression of this array
See also
MatrixBase::array()

Definition at line 150 of file ArrayBase.h.

150 { return MatrixWrapper<Derived>(derived()); }

◆ matrix() [2/2]

template<typename Derived >
const MatrixWrapper<const Derived> Eigen::ArrayBase< Derived >::matrix ( ) const
inline

Definition at line 152 of file ArrayBase.h.

152 { return MatrixWrapper<const Derived>(derived()); }

◆ operator*=()

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::ArrayBase< Derived >::operator*= ( const ArrayBase< OtherDerived > &  other)
inline

replaces *this by *this * other coefficient wise.

Returns
a reference to *this

Definition at line 207 of file ArrayBase.h.

208 {
209  call_assignment(derived(), other.derived(), internal::mul_assign_op<Scalar,typename OtherDerived::Scalar>());
210  return derived();
211 }
void call_assignment(Dst &dst, const Src &src)

◆ operator+=() [1/3]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::ArrayBase< Derived >::operator+= ( const ArrayBase< OtherDerived > &  other)
inline

replaces *this by *this + other.

Returns
a reference to *this

Definition at line 194 of file ArrayBase.h.

195 {
196  call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
197  return derived();
198 }

◆ operator+=() [2/3]

template<typename Derived >
template<typename OtherDerived >
Derived& Eigen::ArrayBase< Derived >::operator+= ( const MatrixBase< OtherDerived > &  )
inlineprotected

Definition at line 167 of file ArrayBase.h.

168  {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26

◆ operator+=() [3/3]

template<typename Derived >
Derived & Eigen::ArrayBase< Derived >::operator+= ( const Scalar scalar)
inline

Definition at line 27 of file SelfCwiseBinaryOp.h.

28 {
29  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::add_assign_op<Scalar,Scalar>());
30  return derived();
31 }
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: EigenBase.h:65
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: EigenBase.h:62

◆ operator-=() [1/3]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::ArrayBase< Derived >::operator-= ( const ArrayBase< OtherDerived > &  other)
inline

replaces *this by *this - other.

Returns
a reference to *this

Definition at line 181 of file ArrayBase.h.

182 {
183  call_assignment(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());
184  return derived();
185 }

◆ operator-=() [2/3]

template<typename Derived >
template<typename OtherDerived >
Derived& Eigen::ArrayBase< Derived >::operator-= ( const MatrixBase< OtherDerived > &  )
inlineprotected

Definition at line 170 of file ArrayBase.h.

171  {EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}

◆ operator-=() [3/3]

template<typename Derived >
Derived & Eigen::ArrayBase< Derived >::operator-= ( const Scalar scalar)
inline

Definition at line 34 of file SelfCwiseBinaryOp.h.

35 {
36  internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::sub_assign_op<Scalar,Scalar>());
37  return derived();
38 }

◆ operator/=()

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::ArrayBase< Derived >::operator/= ( const ArrayBase< OtherDerived > &  other)
inline

replaces *this by *this / other coefficient wise.

Returns
a reference to *this

Definition at line 220 of file ArrayBase.h.

221 {
222  call_assignment(derived(), other.derived(), internal::div_assign_op<Scalar,typename OtherDerived::Scalar>());
223  return derived();
224 }

◆ operator=() [1/2]

template<typename Derived >
Derived& Eigen::ArrayBase< Derived >::operator= ( const ArrayBase< Derived > &  other)
inline

Special case of the template operator=, in order to prevent the compiler from generating a default operator= (issue hit with g++ 4.1)

Definition at line 109 of file ArrayBase.h.

110  {
111  internal::call_assignment(derived(), other.derived());
112  return derived();
113  }

◆ operator=() [2/2]

template<typename Derived >
Derived& Eigen::ArrayBase< Derived >::operator= ( const Scalar value)
inline

Set all the entries to value.

See also
DenseBase::setConstant(), DenseBase::fill()

Definition at line 118 of file ArrayBase.h.

119  { Base::setConstant(value); return derived(); }
v setConstant(3, 5)
CoeffReturnType value() const
Definition: DenseBase.h:524

Friends And Related Function Documentation

◆ atan2()

template<typename LhsDerived , typename RhsDerived >
const std::enable_if_t< std::is_same< typename LhsDerived::Scalar, typename RhsDerived::Scalar >::value, Eigen::CwiseBinaryOp< Eigen::internal::scalar_atan2_op< typename LhsDerived::Scalar, typename RhsDerived::Scalar >, const LhsDerived, const RhsDerived > > atan2 ( const Eigen::ArrayBase< LhsDerived > &  x,
const Eigen::ArrayBase< RhsDerived > &  exponents 
)
related
Returns
an expression of the coefficient-wise atan2(x, y). x and y must be of the same type.

This function computes the coefficient-wise atan2().

See also
ArrayBase::atan2()

Definition at line 191 of file GlobalFunctions.h.

196  {

◆ pow() [1/3]

template<typename Derived , typename ExponentDerived >
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_pow_op< typename Derived::Scalar, typename ExponentDerived::Scalar >, const Derived, const ExponentDerived > pow ( const Eigen::ArrayBase< Derived > &  x,
const Eigen::ArrayBase< ExponentDerived > &  exponents 
)
related
Returns
an expression of the coefficient-wise power of x to the given array of exponents.

This function computes the coefficient-wise power.

Example:

Array<double,1,3> x(8,25,3),
e(1./3.,0.5,2.);
cout << "[" << x << "]^[" << e << "] = " << x.pow(e) << endl; // using ArrayBase::pow
cout << "[" << x << "]^[" << e << "] = " << pow(x,e) << endl; // using Eigen::pow
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const GlobalUnaryPowReturnType< Derived, ScalarExponent > pow(const Eigen::ArrayBase< Derived > &x, const ScalarExponent &exponent)

Output:

[ 8 25  3]^[0.333   0.5     2] = 2 5 9
[ 8 25  3]^[0.333   0.5     2] = 2 5 9
See also
ArrayBase::pow()

Definition at line 139 of file GlobalFunctions.h.

145  {

◆ pow() [2/3]

template<typename Derived , typename ScalarExponent >
const GlobalUnaryPowReturnType< Derived, ScalarExponent > pow ( const Eigen::ArrayBase< Derived > &  x,
const ScalarExponent &  exponent 
)
related
Returns
an expression of the coefficient-wise power of x to the given constant exponent.
Template Parameters
ScalarExponentis the scalar type of exponent. It must be compatible with the scalar type of the given expression (Derived::Scalar).
See also
ArrayBase::pow()

◆ pow() [3/3]

template<typename Scalar , typename Derived >
const CwiseBinaryOp< internal::scalar_pow_op< Scalar, Derived::Scalar >, Constant< Scalar >, Derived > pow ( const Scalar x,
const Eigen::ArrayBase< Derived > &  x 
)
related
Returns
an expression of the coefficient-wise power of the scalar x to the given array of exponents.

This function computes the coefficient-wise power between a scalar and an array of exponents.

Template Parameters
Scalaris the scalar type of x. It must be compatible with the scalar type of the given array expression (Derived::Scalar).

Example:

Array<double,1,3> e(2,-3,1./3.);
cout << "10^[" << e << "] = " << pow(10,e) << endl;

Output:

10^[    2    -3 0.333] =   100 0.001  2.15
See also
ArrayBase::pow()

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