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

Public Types | Public Member Functions | Protected Attributes | Private Member Functions

Diagonal< MatrixType, DiagIndex > Class Template Reference

Expression of a diagonal/subdiagonal/superdiagonal in a matrix. More...

#include <Diagonal.h>

Inheritance diagram for Diagonal< MatrixType, DiagIndex >:
Inheritance graph
Collaboration diagram for Diagonal< MatrixType, DiagIndex >:
Collaboration graph

List of all members.

Public Types

< Diagonal >::type 

Public Member Functions

CoeffReturnType coeff (Index row, Index) const
CoeffReturnType coeff (Index index) const
const Scalar & coeffRef (Index index) const
Scalar & coeffRef (Index index)
Scalar & coeffRef (Index row, Index)
const Scalar & coeffRef (Index row, Index) const
Index cols () const
 Diagonal (MatrixType &matrix, Index index=DiagIndex)
Index innerStride () const
Index outerStride () const
Index rows () const

Protected Attributes

< Index, DiagIndex > 
const MatrixType::Nested m_matrix

Private Member Functions

EIGEN_STRONG_INLINE Index absDiagIndex () const
EIGEN_STRONG_INLINE Index colOffset () const
template<int LoadMode>
MatrixType::PacketReturnType packet (Index) const
template<int LoadMode>
MatrixType::PacketReturnType packet (Index, Index) const
EIGEN_STRONG_INLINE Index rowOffset () const

Detailed Description

template<typename MatrixType, int DiagIndex>
class Diagonal< MatrixType, DiagIndex >

Expression of a diagonal/subdiagonal/superdiagonal in a matrix.

MatrixTypethe type of the object in which we are taking a sub/main/super diagonal
DiagIndexthe index of the sub/super diagonal. The default is 0 and it means the main diagonal. A positive value means a superdiagonal, a negative value means a subdiagonal. You can also use Dynamic so the index can be set at runtime.

The matrix is not required to be square.

This class represents an expression of the main diagonal, or any sub/super diagonal of a square matrix. It is the return type of MatrixBase::diagonal() and MatrixBase::diagonal(Index) and most of the time this is the only way it is used.

See also:
MatrixBase::diagonal(), MatrixBase::diagonal(Index)

Definition at line 77 of file Diagonal.h.

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

Generated by  Doxygen 1.6.0   Back to index