Public Types | Public Member Functions | Protected Attributes
MapBase< Derived > Class Template Reference

Base class for Map and Block expression with direct access. More...

List of all members.

Public Types

enum  {
  IsRowMajor,
  PacketAccess,
  RowsAtCompileTime,
  ColsAtCompileTime,
  SizeAtCompileTime
}
typedef ei_traits< Derived >
::AlignedDerivedType 
AlignedDerivedType
typedef MatrixBase< Derived > Base
typedef Base::PacketScalar PacketScalar
typedef ei_traits< Derived >
::Scalar 
Scalar

Public Member Functions

const Scalar & coeff (int row, int col) const
const Scalar coeff (int index) const
Scalar & coeffRef (int index)
Scalar & coeffRef (int row, int col)
int cols () const
const Scalar * data () const
AlignedDerivedType forceAligned ()
 MapBase (const Scalar *data, int rows, int cols)
 MapBase (const Scalar *data)
 MapBase (const Scalar *data, int size)
Derived & operator*= (const Scalar &other)
template<typename OtherDerived >
Derived & operator+= (const MatrixBase< OtherDerived > &other)
template<typename OtherDerived >
Derived & operator-= (const MatrixBase< OtherDerived > &other)
Derived & operator/= (const Scalar &other)
Derived & operator= (const MapBase &other)
template<typename OtherDerived >
Derived & operator= (const MatrixBase< OtherDerived > &other)
template<int LoadMode>
PacketScalar packet (int index) const
template<int LoadMode>
PacketScalar packet (int row, int col) const
int rows () const
int stride () const
template<int StoreMode>
void writePacket (int index, const PacketScalar &x)
template<int StoreMode>
void writePacket (int row, int col, const PacketScalar &x)

Protected Attributes

const ei_int_if_dynamic
< ColsAtCompileTime > 
m_cols
const Scalar *EIGEN_RESTRICT m_data
const ei_int_if_dynamic
< RowsAtCompileTime > 
m_rows

Detailed Description

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

Base class for Map and Block expression with direct access.

Expression classes inheriting MapBase must define the constant PacketAccess, and type AlignedDerivedType in their respective ei_traits<> specialization structure. The value of PacketAccess can be either:

See also:
class Map, class Block

Member Function Documentation

const Scalar& coeff ( int  row,
int  col 
) const [inline]

Short version: don't use this function, use operator()(int,int) const instead.

Long version: this function is similar to operator()(int,int) const , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters row and col are in range.

If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator()(int,int) const .

See also:
operator()(int,int) const, coeffRef(int,int), coeff(int) const

Reimplemented from MatrixBase< Derived >.

const Scalar coeff ( int  index) const [inline]

Short version: don't use this function, use operator[](int) const instead.

Long version: this function is similar to operator[](int) const , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameter index is in range.

If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator[](int) const .

See also:
operator[](int) const, coeffRef(int), coeff(int,int) const

Reimplemented from MatrixBase< Derived >.

Scalar& coeffRef ( int  index) [inline]

Short version: don't use this function, use operator[](int) instead.

Long version: this function is similar to operator[](int), but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters row and col are in range.

If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator[](int).

See also:
operator[](int), coeff(int) const, coeffRef(int,int)

Reimplemented from MatrixBase< Derived >.

Scalar& coeffRef ( int  row,
int  col 
) [inline]

Short version: don't use this function, use operator()(int,int) instead.

Long version: this function is similar to operator()(int,int), but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters row and col are in range.

If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator()(int,int).

See also:
operator()(int,int), coeff(int, int) const, coeffRef(int)

Reimplemented from MatrixBase< Derived >.

int cols ( void  ) const [inline]
Returns:
the number of columns.
See also:
rows(), ColsAtCompileTime

Reimplemented from MatrixBase< Derived >.

AlignedDerivedType forceAligned ( ) [inline]
Returns:
an expression equivalent to *this but having the PacketAccess constant set to ForceAligned. Must be reimplemented by the derived class.
Derived& operator+= ( const MatrixBase< OtherDerived > &  other) [inline]

replaces *this by *this + other.

Returns:
a reference to *this

Reimplemented from MatrixBase< Derived >.

Derived& operator-= ( const MatrixBase< OtherDerived > &  other) [inline]

replaces *this by *this - other.

Returns:
a reference to *this

Reimplemented from MatrixBase< Derived >.

Derived& operator= ( const MatrixBase< OtherDerived > &  other) [inline]

Copies other into *this.

Returns:
a reference to *this.

Reimplemented from MatrixBase< Derived >.

PacketScalar packet ( int  row,
int  col 
) const [inline]
Returns:
the packet of coefficients starting at the given row and column. It is your responsibility to ensure that a packet really starts there. This method is only available on expressions having the PacketAccessBit.

The LoadMode parameter may have the value Aligned or Unaligned. Its effect is to select the appropriate vectorization instruction. Aligned access is faster, but is only possible for packets starting at an address which is a multiple of the packet size.

Reimplemented from MatrixBase< Derived >.

PacketScalar packet ( int  index) const [inline]
Returns:
the packet of coefficients starting at the given index. It is your responsibility to ensure that a packet really starts there. This method is only available on expressions having the PacketAccessBit and the LinearAccessBit.

The LoadMode parameter may have the value Aligned or Unaligned. Its effect is to select the appropriate vectorization instruction. Aligned access is faster, but is only possible for packets starting at an address which is a multiple of the packet size.

Reimplemented from MatrixBase< Derived >.

int rows ( void  ) const [inline]
Returns:
the number of rows.
See also:
cols(), RowsAtCompileTime

Reimplemented from MatrixBase< Derived >.

int stride ( void  ) const [inline]
Returns:
number of elements to skip to pass from one row (resp. column) to another for a row-major (resp. column-major) matrix. Combined with coeffRef() and the flags flags, it allows a direct access to the data of the underlying matrix.

Reimplemented from MatrixBase< Derived >.

Reimplemented in Map< MatrixType, PacketAccess >.


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