MapBase< Derived > Class Template Reference

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

#include <MapBase.h>

Inheritance diagram for MapBase< Derived >:
Inheritance graph
[legend]

List of all members.

Classes

struct  force_aligned_impl
struct  force_aligned_impl< false, Dummy >

Public Types

enum  {
  IsRowMajor = (int(ei_traits<Derived>::Flags) & RowMajorBit) ? 1 : 0, PacketAccess = ei_traits<Derived>::PacketAccess, RowsAtCompileTime = ei_traits<Derived>::RowsAtCompileTime, ColsAtCompileTime = ei_traits<Derived>::ColsAtCompileTime,
  SizeAtCompileTime = Base::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 index) const
const Scalarcoeff (int row, int col) const
ScalarcoeffRef (int index)
ScalarcoeffRef (int row, int col)
int cols () const
const Scalardata () const
AlignedDerivedType forceAligned ()
 MapBase (const Scalar *data, int rows, int cols)
 MapBase (const Scalar *data, int size)
 MapBase (const Scalar *data)
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)
template<typename OtherDerived >
Derived & operator= (const MatrixBase< OtherDerived > &other)
Derived & operator= (const MapBase &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 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

Definition at line 43 of file MapBase.h.


Member Typedef Documentation

template<typename Derived>
typedef ei_traits<Derived>::AlignedDerivedType MapBase< Derived >::AlignedDerivedType
template<typename Derived>
typedef MatrixBase<Derived> MapBase< Derived >::Base

Definition at line 48 of file MapBase.h.

template<typename Derived>
typedef Base::PacketScalar MapBase< Derived >::PacketScalar

Reimplemented from MatrixBase< Derived >.

Definition at line 59 of file MapBase.h.

template<typename Derived>
typedef ei_traits<Derived>::Scalar MapBase< Derived >::Scalar

Reimplemented from MatrixBase< Derived >.

Definition at line 58 of file MapBase.h.


Member Enumeration Documentation

template<typename Derived>
anonymous enum
Enumerator:
IsRowMajor 
PacketAccess 
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.

See also:
MatrixBase::rows(), MatrixBase::cols(), ColsAtCompileTime, SizeAtCompileTime
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.

See also:
MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime
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.

See also:
RowsAtCompileTime, ColsAtCompileTime

Definition at line 49 of file MapBase.h.


Constructor & Destructor Documentation

template<typename Derived>
MapBase< Derived >::MapBase ( const Scalar data  )  [inline]

Definition at line 146 of file MapBase.h.

template<typename Derived>
MapBase< Derived >::MapBase ( const Scalar data,
int  size 
) [inline]

Definition at line 151 of file MapBase.h.

template<typename Derived>
MapBase< Derived >::MapBase ( const Scalar data,
int  rows,
int  cols 
) [inline]

Definition at line 161 of file MapBase.h.


Member Function Documentation

template<typename Derived>
const Scalar MapBase< Derived >::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 >.

Definition at line 99 of file MapBase.h.

template<typename Derived>
const Scalar& MapBase< Derived >::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 >.

Definition at line 83 of file MapBase.h.

template<typename Derived>
Scalar& MapBase< Derived >::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 >.

Definition at line 108 of file MapBase.h.

template<typename Derived>
Scalar& MapBase< Derived >::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 >.

Definition at line 91 of file MapBase.h.

template<typename Derived>
int MapBase< Derived >::cols (  )  const [inline]
Returns:
the number of columns.
See also:
rows(), ColsAtCompileTime

Reimplemented from MatrixBase< Derived >.

Definition at line 63 of file MapBase.h.

template<typename Derived>
const Scalar* MapBase< Derived >::data (  )  const [inline]

Definition at line 66 of file MapBase.h.

template<typename Derived>
AlignedDerivedType MapBase< Derived >::forceAligned (  )  [inline]
Returns:
an expression equivalent to *this but having the PacketAccess constant set to ForceAligned. Must be reimplemented by the derived class.

Definition at line 78 of file MapBase.h.

template<typename Derived>
Derived& MapBase< Derived >::operator*= ( const Scalar other  )  [inline]

Reimplemented from MatrixBase< Derived >.

Definition at line 190 of file MapBase.h.

template<typename Derived>
template<typename OtherDerived >
Derived& MapBase< Derived >::operator+= ( const MatrixBase< OtherDerived > &  other  )  [inline]

replaces *this by *this + other.

Returns:
a reference to *this

Reimplemented from MatrixBase< Derived >.

Definition at line 183 of file MapBase.h.

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

replaces *this by *this - other.

Returns:
a reference to *this

Reimplemented from MatrixBase< Derived >.

Definition at line 187 of file MapBase.h.

template<typename Derived>
Derived& MapBase< Derived >::operator/= ( const Scalar other  )  [inline]

Reimplemented from MatrixBase< Derived >.

Definition at line 193 of file MapBase.h.

template<typename Derived>
template<typename OtherDerived >
Derived& MapBase< Derived >::operator= ( const MatrixBase< OtherDerived > &  other  )  [inline]

Copies other into *this.

Returns:
a reference to *this.

Reimplemented from MatrixBase< Derived >.

Definition at line 175 of file MapBase.h.

template<typename Derived>
Derived& MapBase< Derived >::operator= ( const MapBase< Derived > &  other  )  [inline]

Definition at line 169 of file MapBase.h.

template<typename Derived>
template<int LoadMode>
PacketScalar MapBase< Derived >::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 >.

Definition at line 126 of file MapBase.h.

template<typename Derived>
template<int LoadMode>
PacketScalar MapBase< Derived >::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 >.

Definition at line 118 of file MapBase.h.

template<typename Derived>
int MapBase< Derived >::rows (  )  const [inline]
Returns:
the number of rows.
See also:
cols(), RowsAtCompileTime

Reimplemented from MatrixBase< Derived >.

Definition at line 62 of file MapBase.h.

template<typename Derived>
int MapBase< Derived >::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 Block< MatrixType, BlockRows, BlockCols, PacketAccess, HasDirectAccess >, and Map< MatrixType, PacketAccess >.

Definition at line 65 of file MapBase.h.

template<typename Derived>
template<int StoreMode>
void MapBase< Derived >::writePacket ( int  index,
const PacketScalar x 
) [inline]

Definition at line 140 of file MapBase.h.

template<typename Derived>
template<int StoreMode>
void MapBase< Derived >::writePacket ( int  row,
int  col,
const PacketScalar x 
) [inline]

Definition at line 132 of file MapBase.h.


Member Data Documentation

template<typename Derived>
const ei_int_if_dynamic<ColsAtCompileTime> MapBase< Derived >::m_cols [protected]

Definition at line 199 of file MapBase.h.

template<typename Derived>
const Scalar* EIGEN_RESTRICT MapBase< Derived >::m_data [protected]

Definition at line 197 of file MapBase.h.

template<typename Derived>
const ei_int_if_dynamic<RowsAtCompileTime> MapBase< Derived >::m_rows [protected]

Definition at line 198 of file MapBase.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:22:05 2013