Eigen::Diagonal< MatrixType, _DiagIndex > Class Template Reference

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

#include <Diagonal.h>

List of all members.

Public Types

typedef internal::dense_xpr_base<
Diagonal >::type 
Base
typedef internal::conditional<
internal::is_lvalue< MatrixType
>::value, Scalar, const Scalar
>::type 
ScalarWithConstIfNotLvalue
 DiagIndex = _DiagIndex
enum  { DiagIndex = _DiagIndex }

Public Member Functions

 Diagonal (MatrixType &matrix, Index a_index=DiagIndex)
Index rows () const
Index cols () const
Index innerStride () const
Index outerStride () const
ScalarWithConstIfNotLvaluedata ()
const Scalar * data () const
Scalar & coeffRef (Index row, Index)
const Scalar & coeffRef (Index row, Index) const
CoeffReturnType coeff (Index row, Index) const
Scalar & coeffRef (Index idx)
const Scalar & coeffRef (Index idx) const
CoeffReturnType coeff (Index idx) const
const internal::remove_all<
typename MatrixType::Nested
>::type
nestedExpression () const
int index () const

Protected Attributes

MatrixType::Nested m_matrix
const internal::variable_if_dynamicindex<
Index, DiagIndex > 
m_index


Detailed Description

template<typename MatrixType, int _DiagIndex>
class Eigen::Diagonal< MatrixType, _DiagIndex >

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

Parameters:
MatrixType the type of the object in which we are taking a sub/main/super diagonal
DiagIndex the 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 64 of file Diagonal.h.


Member Typedef Documentation

template<typename MatrixType, int _DiagIndex>
typedef internal::dense_xpr_base<Diagonal>::type Eigen::Diagonal< MatrixType, _DiagIndex >::Base

Definition at line 70 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
typedef internal::conditional< internal::is_lvalue<MatrixType>::value, Scalar, const Scalar >::type Eigen::Diagonal< MatrixType, _DiagIndex >::ScalarWithConstIfNotLvalue

Definition at line 96 of file Diagonal.h.


Member Enumeration Documentation

template<typename MatrixType, int _DiagIndex>
anonymous enum

Enumerator:
DiagIndex 

Definition at line 69 of file Diagonal.h.


Constructor & Destructor Documentation

template<typename MatrixType, int _DiagIndex>
Eigen::Diagonal< MatrixType, _DiagIndex >::Diagonal ( MatrixType &  matrix,
Index  a_index = DiagIndex 
) [inline]

Definition at line 73 of file Diagonal.h.


Member Function Documentation

template<typename MatrixType, int _DiagIndex>
CoeffReturnType Eigen::Diagonal< MatrixType, _DiagIndex >::coeff ( Index  idx  )  const [inline]

Definition at line 128 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
CoeffReturnType Eigen::Diagonal< MatrixType, _DiagIndex >::coeff ( Index  row,
Index   
) const [inline]

Definition at line 112 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
const Scalar& Eigen::Diagonal< MatrixType, _DiagIndex >::coeffRef ( Index  idx  )  const [inline]

Definition at line 123 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
Scalar& Eigen::Diagonal< MatrixType, _DiagIndex >::coeffRef ( Index  idx  )  [inline]

Definition at line 117 of file Diagonal.h.

References EIGEN_STATIC_ASSERT_LVALUE.

template<typename MatrixType, int _DiagIndex>
const Scalar& Eigen::Diagonal< MatrixType, _DiagIndex >::coeffRef ( Index  row,
Index   
) const [inline]

Definition at line 107 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
Scalar& Eigen::Diagonal< MatrixType, _DiagIndex >::coeffRef ( Index  row,
Index   
) [inline]

Definition at line 101 of file Diagonal.h.

References EIGEN_STATIC_ASSERT_LVALUE.

template<typename MatrixType, int _DiagIndex>
Index Eigen::Diagonal< MatrixType, _DiagIndex >::cols ( void   )  const [inline]

Definition at line 80 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
const Scalar* Eigen::Diagonal< MatrixType, _DiagIndex >::data (  )  const [inline]

Definition at line 99 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
ScalarWithConstIfNotLvalue* Eigen::Diagonal< MatrixType, _DiagIndex >::data (  )  [inline]

Definition at line 98 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
int Eigen::Diagonal< MatrixType, _DiagIndex >::index (  )  const [inline]

Definition at line 139 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
Index Eigen::Diagonal< MatrixType, _DiagIndex >::innerStride (  )  const [inline]

Definition at line 82 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
const internal::remove_all<typename MatrixType::Nested>::type& Eigen::Diagonal< MatrixType, _DiagIndex >::nestedExpression (  )  const [inline]

Definition at line 134 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
Index Eigen::Diagonal< MatrixType, _DiagIndex >::outerStride (  )  const [inline]

Definition at line 87 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
Index Eigen::Diagonal< MatrixType, _DiagIndex >::rows ( void   )  const [inline]

Definition at line 77 of file Diagonal.h.


Member Data Documentation

template<typename MatrixType, int _DiagIndex>
const internal::variable_if_dynamicindex<Index, DiagIndex> Eigen::Diagonal< MatrixType, _DiagIndex >::m_index [protected]

Definition at line 146 of file Diagonal.h.

template<typename MatrixType, int _DiagIndex>
MatrixType::Nested Eigen::Diagonal< MatrixType, _DiagIndex >::m_matrix [protected]

Definition at line 145 of file Diagonal.h.


The documentation for this class was generated from the following file:
Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7