Logo Search packages:      
Sourcecode: eigen3 version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends

Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > Class Template Reference

General-purpose arrays with easy API for coefficient-wise operations. More...

#include <Array.h>

Inheritance diagram for Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >:
Inheritance graph
[legend]
Collaboration diagram for Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  
enum  
enum  { Options = _Options }
enum  { NeedsToAlign }
typedef Eigen::Map< Array
< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols >
, Aligned > 
AlignedMapType
typedef PlainObjectBase< ArrayBase
typedef const Eigen::Map
< const Array< _Scalar, _Rows,
_Cols, _Options, _MaxRows,
_MaxCols >, Aligned > 
ConstAlignedMapType
typedef const Eigen::Map
< const Array< _Scalar, _Rows,
_Cols, _Options, _MaxRows,
_MaxCols >, Unaligned > 
ConstMapType
typedef Array< _Scalar, _Rows,
_Cols, _Options, _MaxRows,
_MaxCols > 
DenseType
typedef internal::traits
< Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols >
>::Index 
Index
typedef Eigen::Map< Array
< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols >
, Unaligned > 
MapType
typedef
internal::packet_traits
< Scalar >::type 
PacketScalar
typedef Base::PlainObject PlainObject
typedef NumTraits< Scalar >::Real RealScalar
typedef internal::traits
< Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols >
>::Scalar 
Scalar
typedef internal::traits
< Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols >
>::StorageKind 
StorageKind

Public Member Functions

EIGEN_STRONG_INLINE Array ()
 Array (internal::constructor_without_unaligned_array_assert)
EIGEN_STRONG_INLINE Array (const Scalar &x, const Scalar &y, const Scalar &z)
EIGEN_STRONG_INLINE Array (const Scalar &x, const Scalar &y, const Scalar &z, const Scalar &w)
 Array (const Scalar *data)
template<typename OtherDerived >
EIGEN_STRONG_INLINE Array (const ArrayBase< OtherDerived > &other)
EIGEN_STRONG_INLINE Array (Index dim)
EIGEN_STRONG_INLINE Array (const Array &other)
template<typename OtherDerived >
EIGEN_STRONG_INLINE Array (const ReturnByValue< OtherDerived > &other)
template<typename T0 , typename T1 >
EIGEN_STRONG_INLINE Array (const T0 &x, const T1 &y)
template<typename OtherDerived >
EIGEN_STRONG_INLINE Array (const EigenBase< OtherDerived > &other)
Basebase ()
const Basebase () const
EIGEN_STRONG_INLINE const Scalar & coeff (Index row, Index col) const
EIGEN_STRONG_INLINE const Scalar & coeff (Index index) const
EIGEN_STRONG_INLINE Scalar & coeffRef (Index row, Index col)
EIGEN_STRONG_INLINE Scalar & coeffRef (Index index)
EIGEN_STRONG_INLINE const Scalar & coeffRef (Index row, Index col) const
EIGEN_STRONG_INLINE const Scalar & coeffRef (Index index) const
EIGEN_STRONG_INLINE Index cols () const
EIGEN_STRONG_INLINE void conservativeResize (Index rows, Index cols)
EIGEN_STRONG_INLINE void conservativeResize (Index rows, NoChange_t)
EIGEN_STRONG_INLINE void conservativeResize (Index size)
EIGEN_STRONG_INLINE void conservativeResize (NoChange_t, Index cols)
EIGEN_STRONG_INLINE void conservativeResizeLike (const DenseBase< OtherDerived > &other)
EIGEN_STRONG_INLINE const Scalar * data () const
EIGEN_STRONG_INLINE Scalar * data ()
Index innerStride () const
EIGEN_STRONG_INLINE Array
< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
lazyAssign (const DenseBase< OtherDerived > &other)
template<typename OtherDerived >
EIGEN_STRONG_INLINE Arrayoperator= (const EigenBase< OtherDerived > &other)
template<typename OtherDerived >
EIGEN_STRONG_INLINE Arrayoperator= (const ArrayBase< OtherDerived > &other)
EIGEN_STRONG_INLINE Arrayoperator= (const Array &other)
Index outerStride () const
EIGEN_STRONG_INLINE PacketScalar packet (Index row, Index col) const
EIGEN_STRONG_INLINE PacketScalar packet (Index index) const
void resize (NoChange_t, Index cols)
EIGEN_STRONG_INLINE void resize (Index rows, Index cols)
void resize (Index size)
void resize (Index rows, NoChange_t)
EIGEN_STRONG_INLINE void resizeLike (const EigenBase< OtherDerived > &_other)
EIGEN_STRONG_INLINE Index rows () const
Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
setConstant (Index size, const Scalar &value)
Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
setConstant (Index rows, Index cols, const Scalar &value)
Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
setOnes (Index size)
Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
setOnes (Index rows, Index cols)
Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
setRandom (Index size)
Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
setRandom (Index rows, Index cols)
Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
setZero (Index rows, Index cols)
Array< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
setZero (Index size)
template<typename OtherDerived >
void swap (ArrayBase< OtherDerived > const &other)
EIGEN_STRONG_INLINE void writePacket (Index row, Index col, const PacketScalar &x)
EIGEN_STRONG_INLINE void writePacket (Index index, const PacketScalar &x)

Static Public Member Functions

static EIGEN_STRONG_INLINE void _check_template_params ()
Map

These are convenience functions returning Map objects. The Map() static functions return unaligned Map objects, while the AlignedMap() functions return aligned Map objects and thus should be called only with 16-byte-aligned data pointers.

These methods do not allow to specify strides. If you need to specify strides, you have to use the Map class directly.

See also:
class Map
static ConstMapType Map (const Scalar *data)
static MapType Map (Scalar *data)
static ConstMapType Map (const Scalar *data, Index size)
static MapType Map (Scalar *data, Index size)
static ConstMapType Map (const Scalar *data, Index rows, Index cols)
static MapType Map (Scalar *data, Index rows, Index cols)
static StridedConstMapType
< Stride< Outer, Inner >
>::type 
Map (const Scalar *data, const Stride< Outer, Inner > &stride)
static StridedMapType< Stride
< Outer, Inner > >::type 
Map (Scalar *data, const Stride< Outer, Inner > &stride)
static StridedConstMapType
< Stride< Outer, Inner >
>::type 
Map (const Scalar *data, Index size, const Stride< Outer, Inner > &stride)
static StridedMapType< Stride
< Outer, Inner > >::type 
Map (Scalar *data, Index size, const Stride< Outer, Inner > &stride)
static StridedConstMapType
< Stride< Outer, Inner >
>::type 
Map (const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
static StridedMapType< Stride
< Outer, Inner > >::type 
Map (Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
static ConstAlignedMapType MapAligned (const Scalar *data)
static AlignedMapType MapAligned (Scalar *data)
static ConstAlignedMapType MapAligned (const Scalar *data, Index size)
static AlignedMapType MapAligned (Scalar *data, Index size)
static ConstAlignedMapType MapAligned (const Scalar *data, Index rows, Index cols)
static AlignedMapType MapAligned (Scalar *data, Index rows, Index cols)
static
StridedConstAlignedMapType
< Stride< Outer, Inner >
>::type 
MapAligned (const Scalar *data, const Stride< Outer, Inner > &stride)
static StridedAlignedMapType
< Stride< Outer, Inner >
>::type 
MapAligned (Scalar *data, const Stride< Outer, Inner > &stride)
static
StridedConstAlignedMapType
< Stride< Outer, Inner >
>::type 
MapAligned (const Scalar *data, Index size, const Stride< Outer, Inner > &stride)
static StridedAlignedMapType
< Stride< Outer, Inner >
>::type 
MapAligned (Scalar *data, Index size, const Stride< Outer, Inner > &stride)
static
StridedConstAlignedMapType
< Stride< Outer, Inner >
>::type 
MapAligned (const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
static StridedAlignedMapType
< Stride< Outer, Inner >
>::type 
MapAligned (Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)

Protected Member Functions

EIGEN_STRONG_INLINE void _init2 (Index rows, Index cols, typename internal::enable_if< Base::SizeAtCompileTime!=2, T0 >::type *=0)
EIGEN_STRONG_INLINE void _init2 (const Scalar &x, const Scalar &y, typename internal::enable_if< Base::SizeAtCompileTime==2, T0 >::type *=0)
EIGEN_STRONG_INLINE void _resize_to_match (const EigenBase< OtherDerived > &other)
EIGEN_STRONG_INLINE Array
< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
_set (const DenseBase< OtherDerived > &other)
 Copies the value of the expression other into *this with automatic resizing.
EIGEN_STRONG_INLINE Array
< _Scalar, _Rows, _Cols,
_Options, _MaxRows, _MaxCols > & 
_set_noalias (const DenseBase< OtherDerived > &other)
EIGEN_STRONG_INLINE void _set_selector (const OtherDerived &other, const internal::false_type &)
EIGEN_STRONG_INLINE void _set_selector (const OtherDerived &other, const internal::true_type &)
void _swap (DenseBase< OtherDerived > const &other)

Protected Attributes

DenseStorage< Scalar,
Base::MaxSizeAtCompileTime,
Base::RowsAtCompileTime,
Base::ColsAtCompileTime,
Options > 
m_storage

Friends

class Eigen::Map
class Eigen::Map< const Derived, Aligned >
class Eigen::Map< const Derived, Unaligned >
class Eigen::Map< Derived, Aligned >
class Eigen::Map< Derived, Unaligned >
struct internal::conservative_resize_like_impl
struct internal::matrix_swap_impl

Detailed Description

template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
class Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols >

General-purpose arrays with easy API for coefficient-wise operations.

The Array class is very similar to the Matrix class. It provides general-purpose one- and two-dimensional arrays. The difference between the Array and the Matrix class is primarily in the API: the API for the Array class provides easy access to coefficient-wise operations, while the API for the Matrix class provides easy access to linear-algebra operations.

This class can be extended with the help of the plugin mechanism described on the page Customizing/Extending Eigen by defining the preprocessor symbol EIGEN_ARRAY_PLUGIN.

See also:
Tutorial page 3 - The Array class and coefficient-wise operations, The class hierarchy

Definition at line 55 of file Array.h.


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

Generated by  Doxygen 1.6.0   Back to index