Public Types | Public Member Functions | Protected Attributes | List of all members
MapBase< Derived > Class Template Reference

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

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 Types inherited from MatrixBase< Derived >
enum  {
  RowsAtCompileTime,
  ColsAtCompileTime,
  SizeAtCompileTime,
  MaxRowsAtCompileTime,
  MaxColsAtCompileTime,
  MaxSizeAtCompileTime,
  IsVectorAtCompileTime,
  Flags,
  CoeffReadCost
}

Public Member Functions

const Scalar & coeff (int row, int col) const
const Scalar coeff (int index) const
Scalar & coeffRef (int row, int col)
Scalar & coeffRef (int index)
int cols () const
const Scalar * data () const
AlignedDerivedType forceAligned ()
 MapBase (const Scalar *data)
 MapBase (const Scalar *data, int size)
 MapBase (const Scalar *data, int rows, int cols)
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 row, int col) const
template<int LoadMode>
PacketScalar packet (int index) const
int rows () const
int stride () const
template<int StoreMode>
void writePacket (int row, int col, const PacketScalar &x)
template<int StoreMode>
void writePacket (int index, const PacketScalar &x)
- Public Member Functions inherited from MatrixBase< Derived >
const AdjointReturnType adjoint () const
bool all (void) const
bool any (void) const
const DiagonalMatrix< Derived > asDiagonal () const
template<typename CustomBinaryOp , typename OtherDerived >
const CwiseBinaryOp
< CustomBinaryOp, Derived,
OtherDerived > 
binaryExpr (const MatrixBase< OtherDerived > &other, const CustomBinaryOp &func=CustomBinaryOp()) const
BlockReturnType< Derived >::Type block (int startRow, int startCol, int blockRows, int blockCols)
const BlockReturnType< Derived >
::Type 
block (int startRow, int startCol, int blockRows, int blockCols) const
template<int BlockRows, int BlockCols>
BlockReturnType< Derived,
BlockRows, BlockCols >::Type 
block (int startRow, int startCol)
template<int BlockRows, int BlockCols>
const BlockReturnType< Derived,
BlockRows, BlockCols >::Type 
block (int startRow, int startCol) const
template<typename NewType >
const CwiseUnaryOp
< ei_scalar_cast_op< typename
ei_traits< Derived >::Scalar,
NewType >, Derived > 
cast () const
ColXpr col (int i)
const ColXpr col (int i) const
const PartialRedux< Derived,
Vertical > 
colwise () const
template<typename OtherDerived >
void computeInverse (MatrixBase< OtherDerived > *result) const
template<typename ResultType >
void computeInverse (MatrixBase< ResultType > *result) const
ConjugateReturnType conjugate () const
BlockReturnType< Derived >::Type corner (CornerType type, int cRows, int cCols)
const BlockReturnType< Derived >
::Type 
corner (CornerType type, int cRows, int cCols) const
template<int CRows, int CCols>
BlockReturnType< Derived,
CRows, CCols >::Type 
corner (CornerType type)
template<int CRows, int CCols>
const BlockReturnType< Derived,
CRows, CCols >::Type 
corner (CornerType type) const
int count () const
template<typename OtherDerived >
PlainMatrixType cross (const MatrixBase< OtherDerived > &other) const
const Cwise< Derived > cwise () const
Cwise< Derived > cwise ()
Scalar determinant () const
DiagonalCoeffs< Derived > diagonal ()
const DiagonalCoeffs< Derived > diagonal () const
template<typename OtherDerived >
Scalar dot (const MatrixBase< OtherDerived > &other) const
EigenvaluesReturnType eigenvalues () const
BlockReturnType< Derived,
Dynamic >::SubVectorType 
end (int size)
const BlockReturnType< Derived,
Dynamic >::SubVectorType 
end (int size) const
template<int Size>
BlockReturnType< Derived, Size >
::SubVectorType 
end ()
template<int Size>
const BlockReturnType< Derived,
Size >::SubVectorType 
end () const
Matrix< Scalar, 3, 1 > eulerAngles (int a0, int a1, int a2) const
const ei_eval< Derived >::type eval () const
void fill (const Scalar &value)
const WithFormat< Derived > format (const IOFormat &fmt) const
const ImagReturnType imag () const
int innerSize () const
const PlainMatrixType inverse () const
template<typename OtherDerived >
bool isApprox (const MatrixBase< OtherDerived > &other, typename NumTraits< Scalar >::Real prec) const
template<typename OtherDerived >
bool isApprox (const MatrixBase< OtherDerived > &other, RealScalar prec=precision< Scalar >()) const
bool isApproxToConstant (const Scalar &value, RealScalar prec=precision< Scalar >()) const
bool isConstant (const Scalar &value, RealScalar prec=precision< Scalar >()) const
bool isDiagonal (RealScalar prec=precision< Scalar >()) const
bool isIdentity (RealScalar prec=precision< Scalar >()) const
bool isLowerTriangular (RealScalar prec=precision< Scalar >()) const
template<typename Derived >
bool isMuchSmallerThan (const typename NumTraits< Scalar >::Real &other, typename NumTraits< Scalar >::Real prec) const
template<typename OtherDerived >
bool isMuchSmallerThan (const MatrixBase< OtherDerived > &other, typename NumTraits< Scalar >::Real prec) const
bool isMuchSmallerThan (const RealScalar &other, RealScalar prec=precision< Scalar >()) const
template<typename OtherDerived >
bool isMuchSmallerThan (const MatrixBase< OtherDerived > &other, RealScalar prec=precision< Scalar >()) const
bool isOnes (RealScalar prec=precision< Scalar >()) const
template<typename OtherDerived >
bool isOrthogonal (const MatrixBase< OtherDerived > &other, RealScalar prec=precision< Scalar >()) const
bool isUnitary (RealScalar prec=precision< Scalar >()) const
bool isUpperTriangular (RealScalar prec=precision< Scalar >()) const
bool isVector () const
bool isZero (RealScalar prec=precision< Scalar >()) const
const Flagged< Derived,
0, EvalBeforeNestingBit|EvalBeforeAssigningBit > 
lazy () const
template<typename Lhs , typename Rhs >
Derived & lazyAssign (const SparseProduct< Lhs, Rhs, SparseTimeDenseProduct > &product)
template<typename Lhs , typename Rhs >
Derived & lazyAssign (const SparseProduct< Lhs, Rhs, DenseTimeSparseProduct > &product)
template<typename Derived1 , typename Derived2 >
Derived & lazyAssign (const SparseProduct< Derived1, Derived2, SparseTimeDenseProduct > &product)
template<typename Derived1 , typename Derived2 >
Derived & lazyAssign (const SparseProduct< Derived1, Derived2, DenseTimeSparseProduct > &product)
template<typename Lhs , typename Rhs >
Derived & lazyAssign (const Product< Lhs, Rhs, CacheFriendlyProduct > &product)
const LDLT< PlainMatrixType > ldlt () const
const LLT< PlainMatrixType > llt () const
template<int p>
RealScalar lpNorm () const
const LU< PlainMatrixType > lu () const
template<unsigned int Added>
const Flagged< Derived, Added, 0 > marked () const
ei_traits< Derived >::Scalar maxCoeff () const
ei_traits< Derived >::Scalar maxCoeff (int *row, int *col) const
ei_traits< Derived >::Scalar maxCoeff (int *index) const
ei_traits< Derived >::Scalar minCoeff () const
ei_traits< Derived >::Scalar minCoeff (int *row, int *col) const
ei_traits< Derived >::Scalar minCoeff (int *index) const
Minor< Derived > minor (int row, int col)
const Minor< Derived > minor (int row, int col) const
const NestByValue< Derived > nestByValue () const
int nonZeros () const
RealScalar norm () const
void normalize ()
const PlainMatrixType normalized () const
template<typename OtherDerived >
bool operator!= (const MatrixBase< OtherDerived > &other) const
const Scalar operator() (int row, int col) const
Scalar & operator() (int row, int col)
const Scalar operator() (int index) const
Scalar & operator() (int index)
const ScalarMultipleReturnType operator* (const Scalar &scalar) const
template<typename OtherDerived >
const ProductReturnType
< Derived, OtherDerived >
::Type 
operator* (const MatrixBase< OtherDerived > &other) const
Derived & operator*= (const Scalar &other)
template<typename OtherDerived >
Derived & operator*= (const MatrixBase< OtherDerived > &other)
template<typename OtherDerived >
const CwiseBinaryOp
< ei_scalar_sum_op< typename
ei_traits< Derived >::Scalar >
, Derived, OtherDerived > 
operator+ (const MatrixBase< OtherDerived > &other) const
template<typename Lhs , typename Rhs >
Derived & operator+= (const Flagged< Product< Lhs, Rhs, CacheFriendlyProduct >, 0, EvalBeforeNestingBit|EvalBeforeAssigningBit > &other)
const CwiseUnaryOp
< ei_scalar_opposite_op
< typename ei_traits< Derived >
::Scalar >, Derived > 
operator- () const
template<typename OtherDerived >
const CwiseBinaryOp
< ei_scalar_difference_op
< typename ei_traits< Derived >
::Scalar >, Derived,
OtherDerived > 
operator- (const MatrixBase< OtherDerived > &other) const
const CwiseUnaryOp
< ei_scalar_quotient1_op
< typename ei_traits< Derived >
::Scalar >, Derived > 
operator/ (const Scalar &scalar) const
Derived & operator/= (const Scalar &other)
CommaInitializer< Derived > operator<< (const Scalar &s)
template<typename OtherDerived >
CommaInitializer< Derived > operator<< (const MatrixBase< OtherDerived > &other)
Derived & operator= (const MatrixBase &other)
template<typename OtherDerived >
bool operator== (const MatrixBase< OtherDerived > &other) const
const Scalar operator[] (int index) const
Scalar & operator[] (int index)
RealScalar operatorNorm () const
int outerSize () const
template<unsigned int Mode>
Part< Derived, Mode > part ()
template<unsigned int Mode>
const Part< Derived, Mode > part () const
const QR< PlainMatrixType > qr () const
const RealReturnType real () const
template<typename BinaryOp >
ei_result_of< BinaryOp(typename
ei_traits< Derived >::Scalar)>
::type 
redux (const BinaryOp &func) const
RowXpr row (int i)
const RowXpr row (int i) const
const PartialRedux< Derived,
Horizontal > 
rowwise () const
BlockReturnType< Derived >
::SubVectorType 
segment (int start, int size)
const BlockReturnType< Derived >
::SubVectorType 
segment (int start, int size) const
template<int Size>
BlockReturnType< Derived, Size >
::SubVectorType 
segment (int start)
template<int Size>
const BlockReturnType< Derived,
Size >::SubVectorType 
segment (int start) const
template<typename ThenDerived , typename ElseDerived >
const Select< Derived,
ThenDerived, ElseDerived > 
select (const MatrixBase< ThenDerived > &thenMatrix, const MatrixBase< ElseDerived > &elseMatrix) const
template<typename ThenDerived >
const Select< Derived,
ThenDerived, NestByValue
< typename
ThenDerived::ConstantReturnType > > 
select (const MatrixBase< ThenDerived > &thenMatrix, typename ThenDerived::Scalar elseScalar) const
template<typename ElseDerived >
const Select< Derived,
NestByValue< typename
ElseDerived::ConstantReturnType >
, ElseDerived > 
select (typename ElseDerived::Scalar thenScalar, const MatrixBase< ElseDerived > &elseMatrix) const
Derived & setConstant (const Scalar &value)
Derived & setIdentity ()
Derived & setOnes ()
Derived & setRandom ()
Derived & setZero ()
int size () const
template<typename OtherDerived >
ei_plain_matrix_type_column_major
< OtherDerived >::type 
solveTriangular (const MatrixBase< OtherDerived > &other) const
template<typename OtherDerived >
void solveTriangularInPlace (const MatrixBase< OtherDerived > &other) const
RealScalar squaredNorm () const
BlockReturnType< Derived,
Dynamic >::SubVectorType 
start (int size)
const BlockReturnType< Derived,
Dynamic >::SubVectorType 
start (int size) const
template<int Size>
BlockReturnType< Derived, Size >
::SubVectorType 
start (void)
template<int Size>
const BlockReturnType< Derived,
Size >::SubVectorType 
start () const
Scalar sum () const
SVD< PlainMatrixType > svd () const
template<typename OtherDerived >
void swap (const MatrixBase< OtherDerived > &other)
Scalar trace () const
Eigen::Transpose< Derived > transpose ()
const Eigen::Transpose< Derived > transpose () const
void transposeInPlace ()
template<typename CustomUnaryOp >
const CwiseUnaryOp
< CustomUnaryOp, Derived > 
unaryExpr (const CustomUnaryOp &func=CustomUnaryOp()) const
PlainMatrixType unitOrthogonal (void) const
template<typename Visitor >
void visit (Visitor &func) const
const Scalar w () const
Scalar & w ()
template<int StoreMode>
void writePacket (int row, int col, const typename ei_packet_traits< typename ei_traits< Derived >::Scalar >::type &x)
template<int StoreMode>
void writePacket (int row, int col, const PacketScalar &x)
template<int StoreMode>
void writePacket (int index, const PacketScalar &x)
template<int StoreMode>
void writePacket (int index, const typename ei_packet_traits< typename ei_traits< Derived >::Scalar >::type &x)
const Scalar x () const
Scalar & x ()
const Scalar y () const
Scalar & y ()
const Scalar z () const
Scalar & z ()

Protected Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from MatrixBase< Derived >
static const ConstantReturnType Constant (int rows, int cols, const Scalar &value)
static const ConstantReturnType Constant (int size, const Scalar &value)
static const ConstantReturnType Constant (const Scalar &value)
static const IdentityReturnType Identity ()
static const IdentityReturnType Identity (int rows, int cols)
template<typename CustomNullaryOp >
static const CwiseNullaryOp
< CustomNullaryOp, Derived > 
NullaryExpr (int rows, int cols, const CustomNullaryOp &func)
template<typename CustomNullaryOp >
static const CwiseNullaryOp
< CustomNullaryOp, Derived > 
NullaryExpr (int size, const CustomNullaryOp &func)
template<typename CustomNullaryOp >
static const CwiseNullaryOp
< CustomNullaryOp, Derived > 
NullaryExpr (const CustomNullaryOp &func)
static const ConstantReturnType Ones (int rows, int cols)
static const ConstantReturnType Ones (int size)
static const ConstantReturnType Ones ()
static const CwiseNullaryOp
< ei_scalar_random_op< Scalar >
, Derived > 
Random (int rows, int cols)
static const CwiseNullaryOp
< ei_scalar_random_op< Scalar >
, Derived > 
Random (int size)
static const CwiseNullaryOp
< ei_scalar_random_op< Scalar >
, Derived > 
Random ()
static const BasisReturnType Unit (int size, int i)
static const BasisReturnType Unit (int i)
static const BasisReturnType UnitW ()
static const BasisReturnType UnitX ()
static const BasisReturnType UnitY ()
static const BasisReturnType UnitZ ()
static const ConstantReturnType Zero (int rows, int cols)
static const ConstantReturnType Zero (int size)
static const ConstantReturnType Zero ()
- Protected Member Functions inherited from MatrixBase< Derived >
 MatrixBase ()
std::ostream & operator<< (std::ostream &s, const MatrixBase< Derived > &m)

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

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

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: