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

Public Types | Public Member Functions | Protected Attributes

Block< XprType, BlockRows, BlockCols, InnerPanel, HasDirectAccess > Class Template Reference

Expression of a fixed-size or dynamic-size block. More...

#include <Block.h>

Inheritance diagram for Block< XprType, BlockRows, BlockCols, InnerPanel, HasDirectAccess >:
Inheritance graph
[legend]
Collaboration diagram for Block< XprType, BlockRows, BlockCols, InnerPanel, HasDirectAccess >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
internal::dense_xpr_base
< Block >::type 
Base

Public Member Functions

 Block (XprType &xpr, Index i)
 Block (XprType &xpr, Index startRow, Index startCol)
 Block (XprType &xpr, Index startRow, Index startCol, Index blockRows, Index blockCols)
EIGEN_STRONG_INLINE const
CoeffReturnType 
coeff (Index row, Index col) const
const CoeffReturnType coeff (Index index) const
Scalar & coeffRef (Index index)
const Scalar & coeffRef (Index index) const
Scalar & coeffRef (Index row, Index col)
const Scalar & coeffRef (Index row, Index col) const
Index cols () const
template<int LoadMode>
PacketScalar packet (Index row, Index col) const
template<int LoadMode>
PacketScalar packet (Index index) const
Index rows () const
template<int LoadMode>
void writePacket (Index row, Index col, const PacketScalar &x)
template<int LoadMode>
void writePacket (Index index, const PacketScalar &x)

Protected Attributes

const
internal::variable_if_dynamic
< Index, ColsAtCompileTime > 
m_blockCols
const
internal::variable_if_dynamic
< Index, RowsAtCompileTime > 
m_blockRows
const
internal::variable_if_dynamic
< Index,
XprType::ColsAtCompileTime==1?0:Dynamic > 
m_startCol
const
internal::variable_if_dynamic
< Index,
XprType::RowsAtCompileTime==1?0:Dynamic > 
m_startRow
const XprType::Nested m_xpr

Detailed Description

template<typename XprType, int BlockRows, int BlockCols, bool InnerPanel, bool HasDirectAccess>
class Block< XprType, BlockRows, BlockCols, InnerPanel, HasDirectAccess >

Expression of a fixed-size or dynamic-size block.

Parameters:
XprTypethe type of the expression in which we are taking a block
BlockRowsthe number of rows of the block we are taking at compile time (optional)
BlockColsthe number of columns of the block we are taking at compile time (optional)
_DirectAccessStatususedfor partial specialization

This class represents an expression of either a fixed-size or dynamic-size block. It is the return type of DenseBase::block(Index,Index,Index,Index) and DenseBase::block<int,int>(Index,Index) and most of the time this is the only way it is used.

However, if you want to directly maniputate block expressions, for instance if you want to write a function returning such an expression, you will need to use this class.

Here is an example illustrating the dynamic case:

Output:

Note:
Even though this expression has dynamic size, in the case where XprType has fixed size, this expression inherits a fixed maximal size which means that evaluating it does not cause a dynamic memory allocation.

Here is an example illustrating the fixed-size case:

Output:

See also:
DenseBase::block(Index,Index,Index,Index), DenseBase::block(Index,Index), class VectorBlock

Definition at line 110 of file Block.h.


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

Generated by  Doxygen 1.6.0   Back to index