plll  1.0
plll::linalg::base_matrix< T, Rows, Cols, StorageTraits, MathObject >::ConstEnumerator Class Reference

An enumerator for matrix elements. More...

#include <matrix.hpp>

Public Types

typedef base_matrix< T, Rows,
Cols, StorageTraits,
MathObject >
::GetCoeffSteps_Type 
GetCoeffSteps_Type
 The intermediate type of the coefficients, which is returned by current().
 
typedef const T & Type
 The final type of the coefficients.
 

Public Member Functions

Type current () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns the current matrix entry. More...
 
template<typename Result >
void get_current (Result &result) const PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(result=*d_entry))
 Creates a copy of the current matrix entry in result. More...
 
GetCoeffSteps_Type get_current_steps () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns a GetCoeffSteps_Type object for the current entry. More...
 
bool has_current () const PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Returns true if a current element exists and can be queried by the current(), get_current() and get_current_steps() methods. More...
 
void next () PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE
 Goes to the next element. More...
 

Detailed Description

template<typename T, int Rows, int Cols, typename StorageTraits, bool MathObject>
class plll::linalg::base_matrix< T, Rows, Cols, StorageTraits, MathObject >::ConstEnumerator

An enumerator for matrix elements.

It enumerates first through the rows and then through the columns. For example, a $2 \times 3$ matrix would be enumerated with indices (0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2).

Definition at line 2452 of file matrix.hpp.

Member Function Documentation

template<typename T, int Rows, int Cols, typename StorageTraits, bool MathObject>
Type plll::linalg::base_matrix< T, Rows, Cols, StorageTraits, MathObject >::ConstEnumerator::current ( ) const
inline

Returns the current matrix entry.

Returns
A reference to the current entry.

Definition at line 2490 of file matrix.hpp.

template<typename T, int Rows, int Cols, typename StorageTraits, bool MathObject>
template<typename Result >
void plll::linalg::base_matrix< T, Rows, Cols, StorageTraits, MathObject >::ConstEnumerator::get_current ( Result &  result) const
inlinenoexcept

Creates a copy of the current matrix entry in result.

Parameters
resultAn object to store the current element in.

Definition at line 2501 of file matrix.hpp.

template<typename T, int Rows, int Cols, typename StorageTraits, bool MathObject>
GetCoeffSteps_Type plll::linalg::base_matrix< T, Rows, Cols, StorageTraits, MathObject >::ConstEnumerator::get_current_steps ( ) const
inline

Returns a GetCoeffSteps_Type object for the current entry.

Returns
A GetCoeffSteps_Type object for the current element.

Definition at line 2511 of file matrix.hpp.

template<typename T, int Rows, int Cols, typename StorageTraits, bool MathObject>
bool plll::linalg::base_matrix< T, Rows, Cols, StorageTraits, MathObject >::ConstEnumerator::has_current ( ) const
inline

Returns true if a current element exists and can be queried by the current(), get_current() and get_current_steps() methods.

Returns
Returns true if an element is available.

Definition at line 2522 of file matrix.hpp.

template<typename T, int Rows, int Cols, typename StorageTraits, bool MathObject>
void plll::linalg::base_matrix< T, Rows, Cols, StorageTraits, MathObject >::ConstEnumerator::next ( )
inline

Goes to the next element.

Must only be called if has_current() is true.

Definition at line 2532 of file matrix.hpp.


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