Rcpp Version 1.1.2
Loading...
Searching...
No Matches
Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator Class Reference

#include <MatrixBase.h>

Collaboration diagram for Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator:

Public Types

typedef stored_type reference
typedef stored_typepointer
typedef R_xlen_t difference_type
typedef stored_type value_type
typedef std::random_access_iterator_tag iterator_category

Public Member Functions

 iterator (const MatrixBase &object_, R_xlen_t index_)
 iterator (const iterator &other)
iteratoroperator++ ()
iterator operator++ (int)
iteratoroperator-- ()
iterator operator-- (int)
iterator operator+ (difference_type n) const
iterator operator- (difference_type n) const
iteratoroperator+= (difference_type n)
iteratoroperator-= (difference_type n)
reference operator* ()
pointer operator-> ()
bool operator== (const iterator &y) const
bool operator!= (const iterator &y) const
bool operator< (const iterator &other) const
bool operator> (const iterator &other) const
bool operator<= (const iterator &other) const
bool operator>= (const iterator &other) const
difference_type operator- (const iterator &other) const

Private Member Functions

void update_index (int index_)
R_xlen_t index () const

Private Attributes

const MatrixBaseobject
int i
int j
int nr
int nc

Detailed Description

template<int RTYPE, bool na, typename MATRIX>
class Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator

Definition at line 83 of file MatrixBase.h.

Member Typedef Documentation

◆ difference_type

template<int RTYPE, bool na, typename MATRIX>
typedef R_xlen_t Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::difference_type

Definition at line 87 of file MatrixBase.h.

◆ iterator_category

template<int RTYPE, bool na, typename MATRIX>
typedef std::random_access_iterator_tag Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::iterator_category

Definition at line 89 of file MatrixBase.h.

◆ pointer

template<int RTYPE, bool na, typename MATRIX>
typedef stored_type* Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::pointer

Definition at line 86 of file MatrixBase.h.

◆ reference

template<int RTYPE, bool na, typename MATRIX>
typedef stored_type Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::reference

Definition at line 85 of file MatrixBase.h.

◆ value_type

template<int RTYPE, bool na, typename MATRIX>
typedef stored_type Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::value_type

Definition at line 88 of file MatrixBase.h.

Constructor & Destructor Documentation

◆ iterator() [1/2]

template<int RTYPE, bool na, typename MATRIX>
Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::iterator ( const MatrixBase & object_,
R_xlen_t index_ )
inline

◆ iterator() [2/2]

template<int RTYPE, bool na, typename MATRIX>
Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::iterator ( const iterator & other)
inline

Definition at line 97 of file MatrixBase.h.

References i, iterator(), j, nc, nr, and object.

Here is the call graph for this function:

Member Function Documentation

◆ index()

template<int RTYPE, bool na, typename MATRIX>
R_xlen_t Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::index ( ) const
inlineprivate

Definition at line 185 of file MatrixBase.h.

References i, j, and nr.

Referenced by operator-(), operator<(), operator<=(), operator>(), and operator>=().

◆ operator!=()

template<int RTYPE, bool na, typename MATRIX>
bool Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator!= ( const iterator & y) const
inline

Definition at line 154 of file MatrixBase.h.

References i, iterator(), and j.

Here is the call graph for this function:

◆ operator*()

template<int RTYPE, bool na, typename MATRIX>
reference Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator* ( )
inline

Definition at line 144 of file MatrixBase.h.

References i, j, and object.

◆ operator+()

template<int RTYPE, bool na, typename MATRIX>
iterator Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator+ ( difference_type n) const
inline

Definition at line 128 of file MatrixBase.h.

References i, iterator(), j, and nr.

Here is the call graph for this function:

◆ operator++() [1/2]

template<int RTYPE, bool na, typename MATRIX>
iterator & Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator++ ( )
inline

Definition at line 100 of file MatrixBase.h.

References i, iterator(), j, and nr.

Here is the call graph for this function:

◆ operator++() [2/2]

template<int RTYPE, bool na, typename MATRIX>
iterator Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator++ ( int )
inline

Definition at line 108 of file MatrixBase.h.

References iterator().

Here is the call graph for this function:

◆ operator+=()

template<int RTYPE, bool na, typename MATRIX>
iterator & Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator+= ( difference_type n)
inline

Definition at line 135 of file MatrixBase.h.

References i, iterator(), j, nr, and update_index().

Here is the call graph for this function:

◆ operator-() [1/2]

template<int RTYPE, bool na, typename MATRIX>
difference_type Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator- ( const iterator & other) const
inline

Definition at line 170 of file MatrixBase.h.

References index(), and iterator().

Here is the call graph for this function:

◆ operator-() [2/2]

template<int RTYPE, bool na, typename MATRIX>
iterator Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator- ( difference_type n) const
inline

Definition at line 131 of file MatrixBase.h.

References i, iterator(), j, and nr.

Here is the call graph for this function:

◆ operator--() [1/2]

template<int RTYPE, bool na, typename MATRIX>
iterator & Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator-- ( )
inline

Definition at line 114 of file MatrixBase.h.

References i, iterator(), j, and nr.

Here is the call graph for this function:

◆ operator--() [2/2]

template<int RTYPE, bool na, typename MATRIX>
iterator Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator-- ( int )
inline

Definition at line 122 of file MatrixBase.h.

References iterator().

Here is the call graph for this function:

◆ operator-=()

template<int RTYPE, bool na, typename MATRIX>
iterator & Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator-= ( difference_type n)
inline

Definition at line 139 of file MatrixBase.h.

References i, iterator(), j, nr, and update_index().

Here is the call graph for this function:

◆ operator->()

template<int RTYPE, bool na, typename MATRIX>
pointer Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator-> ( )
inline

Definition at line 147 of file MatrixBase.h.

References i, j, and object.

◆ operator<()

template<int RTYPE, bool na, typename MATRIX>
bool Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator< ( const iterator & other) const
inline

Definition at line 157 of file MatrixBase.h.

References index(), and iterator().

Here is the call graph for this function:

◆ operator<=()

template<int RTYPE, bool na, typename MATRIX>
bool Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator<= ( const iterator & other) const
inline

Definition at line 163 of file MatrixBase.h.

References index(), and iterator().

Here is the call graph for this function:

◆ operator==()

template<int RTYPE, bool na, typename MATRIX>
bool Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator== ( const iterator & y) const
inline

Definition at line 151 of file MatrixBase.h.

References i, iterator(), and j.

Here is the call graph for this function:

◆ operator>()

template<int RTYPE, bool na, typename MATRIX>
bool Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator> ( const iterator & other) const
inline

Definition at line 160 of file MatrixBase.h.

References index(), and iterator().

Here is the call graph for this function:

◆ operator>=()

template<int RTYPE, bool na, typename MATRIX>
bool Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::operator>= ( const iterator & other) const
inline

Definition at line 166 of file MatrixBase.h.

References index(), and iterator().

Here is the call graph for this function:

◆ update_index()

template<int RTYPE, bool na, typename MATRIX>
void Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::update_index ( int index_)
inlineprivate

Definition at line 180 of file MatrixBase.h.

References Rcpp::internal::get_column(), Rcpp::internal::get_line(), i, j, and nr.

Referenced by iterator(), operator+=(), and operator-=().

Here is the call graph for this function:

Member Data Documentation

◆ i

template<int RTYPE, bool na, typename MATRIX>
int Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::i
private

◆ j

template<int RTYPE, bool na, typename MATRIX>
int Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::j
private

◆ nc

template<int RTYPE, bool na, typename MATRIX>
int Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::nc
private

Definition at line 178 of file MatrixBase.h.

Referenced by iterator(), and iterator().

◆ nr

template<int RTYPE, bool na, typename MATRIX>
int Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::nr
private

◆ object

template<int RTYPE, bool na, typename MATRIX>
const MatrixBase& Rcpp::MatrixBase< RTYPE, na, MATRIX >::iterator::object
private

Definition at line 176 of file MatrixBase.h.

Referenced by iterator(), iterator(), operator*(), and operator->().


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