Rcpp Version 1.0.7
MatrixRow.h
Go to the documentation of this file.
1 // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 //
3 // MatrixRow.h: Rcpp R/C++ interface class library -- matrices row
4 //
5 // Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
6 //
7 // This file is part of Rcpp.
8 //
9 // Rcpp is free software: you can redistribute it and/or modify it
10 // under the terms of the GNU General Public License as published by
11 // the Free Software Foundation, either version 2 of the License, or
12 // (at your option) any later version.
13 //
14 // Rcpp is distributed in the hope that it will be useful, but
15 // WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
21 
22 #ifndef Rcpp__vector__MatrixRow_h
23 #define Rcpp__vector__MatrixRow_h
24 
25 namespace Rcpp{
26 
27 template <int RTYPE>
28 class MatrixRow : public VectorBase< RTYPE, true, MatrixRow<RTYPE> > {
29 public:
31  typedef typename MATRIX::Proxy Proxy ;
32  typedef typename MATRIX::Proxy reference ;
34  typedef typename MATRIX::value_type value_type ;
35 
36  // We now have the structure to correct const-correctness, but without
37  // major changes to the proxy mechanism, we cannot do it correctly. As
38  // a result, it turns out that both MatrixRow iterators are effectively
39  // const, but this has always been the way it is so we won't break any
40  // compatibility. TODO: Fix proxies and make this const correct.
41  struct iter_traits
42  {
44 
45  typedef int difference_type;
48  typedef typename std::iterator_traits<vector_iterator>::pointer pointer;
49  };
50 
52  {
54 
55  typedef int difference_type;
58  typedef typename std::iterator_traits<vector_iterator>::pointer pointer;
59  };
60 
61  template< typename TRAITS >
62  class iter_base {
63  public:
64  typedef typename TRAITS::vector_iterator vector_iterator;
65 
66  typedef typename TRAITS::difference_type difference_type ;
67  typedef typename TRAITS::value_type value_type ;
68  typedef typename TRAITS::reference reference ;
69  typedef typename TRAITS::pointer pointer ;
70 
71  typedef std::random_access_iterator_tag iterator_category ;
72 
73  iter_base( const iter_base& other) : row(other.row), index(other.index){}
74  iter_base( MatrixRow& row_, int index_ ) : row(row_), index(index_){}
75 
77  index++;
78  return *this ;
79  }
81  iterator orig(*this);
82  index++ ;
83  return orig ;
84  }
85 
87  index-- ;
88  return *this ;
89  }
91  iter_base orig(*this);
92  index-- ;
93  return orig ;
94  }
95 
96  iter_base operator+(difference_type n) const { return iter_base( row, index + n ) ; }
97  iter_base operator-(difference_type n) const { return iter_base( row, index - n ) ; }
98  difference_type operator-(const iter_base& other) const { return index - other.index ; }
99 
100  iter_base& operator+=(difference_type n) { index += n ; return *this ;}
101  iter_base& operator-=(difference_type n) { index -= n ; return *this ;}
102 
104  return row[index] ;
105  }
107  return &row[index] ;
108  }
109 
110  bool operator==( const iter_base& other) { return index == other.index ; }
111  bool operator!=( const iter_base& other) { return index != other.index ; }
112  bool operator<( const iter_base& other ) { return index < other.index ;}
113  bool operator>( const iter_base& other ) { return index > other.index ;}
114  bool operator<=( const iter_base& other ) { return index <= other.index ; }
115  bool operator>=( const iter_base& other ) { return index >= other.index ; }
116 
117  inline reference operator[]( int i) const {
118  return row[ index + i ] ;
119  }
120 
122  return index - other.index ;
123  }
124 
125  private:
127  int index ;
128  };
129 
132 
133  MatrixRow( MATRIX& object, int i ) :
134  parent(object),
135  start(parent.begin() + i),
136  parent_nrow(parent.nrow()),
137  row(i)
138  {
139  if( i < 0 || i >= parent.nrow() ) {
140  const char* fmt = "Row index is out of bounds: "
141  "[index=%i; row extent=%i].";
142  throw index_out_of_bounds(fmt, i, parent.nrow()) ;
143  }
144  }
145 
146  MatrixRow( const MatrixRow& other ) :
147  parent(other.parent),
148  start(other.start),
149  parent_nrow(other.parent_nrow),
150  row(other.row)
151  {} ;
152 
153  template <int RT, bool NA, typename T>
155  int n = size() ;
156  const T& ref = rhs.get_ref() ;
158  return *this ;
159  }
160 
161  MatrixRow& operator=( const MatrixRow& rhs ){
162  int n = size() ;
164  return *this ;
165  }
166 
167  inline reference operator[]( int i ){
168  return start[ get_parent_index(i) ] ;
169  }
170 
171  inline reference operator[]( int i ) const {
172  return parent[ row + i * parent_nrow ] ;
173  }
174 
175  inline iterator begin(){
176  return iterator( *this, 0 ) ;
177  }
178 
179  inline iterator end(){
180  return iterator( *this, size() ) ;
181  }
182 
183  inline const_iterator begin() const {
184  return const_iterator( const_cast<MatrixRow&>(*this), 0 ) ;
185  }
186 
187  inline const_iterator end() const {
188  return const_iterator( const_cast<MatrixRow&>(*this), size() ) ;
189  }
190 
191  inline const_iterator cbegin() const {
192  return const_iterator( const_cast<MatrixRow&>(*this), 0 ) ;
193  }
194 
195  inline const_iterator cend() const {
196  return const_iterator( const_cast<MatrixRow&>(*this), size() ) ;
197  }
198 
199  inline int size() const {
200  return parent.ncol() ;
201  }
202 
203 private:
207  int row ;
208 
209  inline int get_parent_index(int i) const {
210  RCPP_DEBUG_4( "MatrixRow<%d>::get_parent_index(int = %d), parent_nrow = %d >> %d\n", RTYPE, i, parent_nrow, i*parent_nrow )
211  return i * parent_nrow ;
212  }
213 } ;
214 
215 template <int RTYPE>
216 class ConstMatrixRow : public VectorBase< RTYPE, true, ConstMatrixRow<RTYPE> > {
217 public:
220  typedef typename MATRIX::value_type value_type ;
221 
223  public:
225 
226  typedef int difference_type ;
229  typedef typename std::iterator_traits<vector_iterator>::pointer pointer ;
230 
231  typedef std::random_access_iterator_tag iterator_category ;
232 
233  const_iterator( const const_iterator& other) : row(other.row), index(other.index){}
234  const_iterator( const ConstMatrixRow& row_, int index_ ) : row(row_), index(index_){}
235 
237  index++;
238  return *this ;
239  }
241  const_iterator orig(*this);
242  index++ ;
243  return orig ;
244  }
245 
247  index-- ;
248  return *this ;
249  }
251  const_iterator orig(*this);
252  index-- ;
253  return orig ;
254  }
255 
258  difference_type operator-(const const_iterator& other) const { return index - other.index ; }
259 
260  const_iterator& operator+=(difference_type n) { index += n ; return *this ;}
261  const_iterator& operator-=(difference_type n) { index -= n ; return *this ;}
262 
264  return row[index] ;
265  }
267  return &row[index] ;
268  }
269 
270  bool operator==( const const_iterator& other) { return index == other.index ; }
271  bool operator!=( const const_iterator& other) { return index != other.index ; }
272  bool operator<( const const_iterator& other ) { return index < other.index ;}
273  bool operator>( const const_iterator& other ) { return index > other.index ;}
274  bool operator<=( const const_iterator& other ) { return index <= other.index ; }
275  bool operator>=( const const_iterator& other ) { return index >= other.index ; }
276 
277  inline const reference operator[]( int i) const {
278  return row[ index + i ] ;
279  }
280 
282  return index - other.index ;
283  }
284 
285  private:
287  int index ;
288  } ;
289 
291 
292  ConstMatrixRow( const MATRIX& object, int i ) :
293  parent(object),
294  start(parent.begin() + i),
295  parent_nrow(parent.nrow()),
296  row(i)
297  {
298  if( i < 0 || i >= parent.nrow() ) {
299  const char* fmt = "Row index is out of bounds: "
300  "[index=%i; row extent=%i].";
301  throw index_out_of_bounds(fmt, i, parent.nrow()) ;
302  }
303  }
304 
305  ConstMatrixRow( const ConstMatrixRow& other ) :
306  parent(other.parent),
307  start(other.start),
308  parent_nrow(other.parent_nrow),
309  row(other.row)
310  {} ;
311 
312  inline const_reference operator[]( int i ) const {
313  return parent[ row + i * parent_nrow ] ;
314  }
315 
316  inline const_iterator begin() const {
317  return const_iterator( *this, 0 ) ;
318  }
319 
320  inline const_iterator end() const {
321  return const_iterator( *this, size() ) ;
322  }
323 
324  inline int size() const {
325  return parent.ncol() ;
326  }
327 
328 private:
329  const MATRIX& parent;
332  int row ;
333 
334  inline int get_parent_index(int i) const {
335  RCPP_DEBUG_4( "ConstMatrixRow<%d>::get_parent_index(int = %d), parent_nrow = %d >> %d\n", RTYPE, i, parent_nrow, i*parent_nrow )
336  return i * parent_nrow ;
337  }
338 } ;
339 }
340 
341 #endif
Rcpp::MatrixRow::reference
MATRIX::Proxy reference
Definition: MatrixRow.h:32
Rcpp::MatrixRow::iter_base::operator++
iter_base operator++(int)
Definition: MatrixRow.h:80
Rcpp::MatrixRow::iter_base::reference
TRAITS::reference reference
Definition: MatrixRow.h:68
Rcpp::ConstMatrixRow::const_iterator::operator==
bool operator==(const const_iterator &other)
Definition: MatrixRow.h:270
Rcpp::MatrixRow::operator[]
reference operator[](int i) const
Definition: MatrixRow.h:171
Rcpp::MatrixRow::iter_base::operator!=
bool operator!=(const iter_base &other)
Definition: MatrixRow.h:111
Rcpp::MatrixRow::iter_base::vector_iterator
TRAITS::vector_iterator vector_iterator
Definition: MatrixRow.h:64
Rcpp::MatrixRow::const_iter_traits::reference
value_type reference
Definition: MatrixRow.h:57
Rcpp::VectorBase< RTYPE, true, ConstMatrixRow< RTYPE > >::const_iterator
iter_base< const_iter_traits > const_iterator
Definition: VectorBase.h:162
Rcpp::MatrixRow::iter_base::operator+
iter_base operator+(difference_type n) const
Definition: MatrixRow.h:96
Rcpp::ConstMatrixRow::const_iterator::reference
traits::r_vector_const_proxy< RTYPE >::type reference
Definition: MatrixRow.h:228
Rcpp::MatrixRow::iter_base::operator>=
bool operator>=(const iter_base &other)
Definition: MatrixRow.h:115
Rcpp::traits::r_vector_proxy::type
storage_type< RTYPE >::type & type
Definition: proxy.h:217
Rcpp::ConstMatrixRow::operator[]
const_reference operator[](int i) const
Definition: MatrixRow.h:312
Rcpp::MatrixRow::MatrixRow
MatrixRow(const MatrixRow &other)
Definition: MatrixRow.h:146
Rcpp::traits::r_vector_iterator::type
storage_type< RTYPE >::type * type
Definition: proxy.h:251
Rcpp::ConstMatrixRow::const_iterator::const_iterator
const_iterator(const ConstMatrixRow &row_, int index_)
Definition: MatrixRow.h:234
Rcpp::MatrixRow::row
int row
Definition: MatrixRow.h:207
Rcpp::MatrixRow::iter_base::iter_base
iter_base(MatrixRow &row_, int index_)
Definition: MatrixRow.h:74
Rcpp::ConstMatrixRow::const_iterator::operator!=
bool operator!=(const const_iterator &other)
Definition: MatrixRow.h:271
Rcpp::Matrix
Definition: Matrix.h:28
Rcpp::ConstMatrixRow::const_iterator::iterator_category
std::random_access_iterator_tag iterator_category
Definition: MatrixRow.h:231
Rcpp::ConstMatrixRow::const_iterator::operator-
difference_type operator-(const const_iterator &other)
Definition: MatrixRow.h:281
Rcpp::MatrixRow::const_iter_traits::value_type
traits::r_vector_proxy< RTYPE >::type value_type
Definition: MatrixRow.h:56
Rcpp::Matrix::ncol
int ncol() const
Definition: Matrix.h:94
Rcpp::MatrixRow::const_iter_traits::difference_type
int difference_type
Definition: MatrixRow.h:55
Rcpp::ConstMatrixRow::const_iterator::operator++
const_iterator & operator++()
Definition: MatrixRow.h:236
Rcpp::traits::r_vector_const_iterator::type
const storage_type< RTYPE >::type * type
Definition: proxy.h:255
Rcpp::ConstMatrixRow::const_iterator::operator++
const_iterator operator++(int)
Definition: MatrixRow.h:240
Rcpp::Matrix::const_Proxy
VECTOR::const_Proxy const_Proxy
Definition: Matrix.h:49
Rcpp::ConstMatrixRow::start
MATRIX::const_iterator start
Definition: MatrixRow.h:330
Rcpp::MatrixRow::iter_base::pointer
TRAITS::pointer pointer
Definition: MatrixRow.h:69
Rcpp::MatrixRow::end
iterator end()
Definition: MatrixRow.h:179
Rcpp::MatrixRow::iter_base::operator--
iter_base operator--(int)
Definition: MatrixRow.h:90
Rcpp::MatrixRow::iter_base::row
MatrixRow & row
Definition: MatrixRow.h:126
Rcpp::MatrixRow::iter_base::value_type
TRAITS::value_type value_type
Definition: MatrixRow.h:67
Rcpp::MatrixRow::iter_base::operator==
bool operator==(const iter_base &other)
Definition: MatrixRow.h:110
Rcpp::ConstMatrixRow::const_iterator::operator-
const_iterator operator-(difference_type n) const
Definition: MatrixRow.h:257
Rcpp::MatrixRow::start
MATRIX::iterator start
Definition: MatrixRow.h:205
Rcpp::ConstMatrixRow::const_iterator::operator<
bool operator<(const const_iterator &other)
Definition: MatrixRow.h:272
Rcpp::MatrixRow::iter_base::operator<=
bool operator<=(const iter_base &other)
Definition: MatrixRow.h:114
Rcpp::ConstMatrixRow::const_iterator::row
const ConstMatrixRow & row
Definition: MatrixRow.h:286
Rcpp::ConstMatrixRow::const_iterator::operator<=
bool operator<=(const const_iterator &other)
Definition: MatrixRow.h:274
Rcpp::ConstMatrixRow::const_iterator::operator>
bool operator>(const const_iterator &other)
Definition: MatrixRow.h:273
Rcpp::MatrixRow::const_iter_traits::vector_iterator
traits::r_vector_const_iterator< RTYPE >::type vector_iterator
Definition: MatrixRow.h:53
Rcpp::MatrixRow
Definition: MatrixRow.h:28
Rcpp::ConstMatrixRow::ConstMatrixRow
ConstMatrixRow(const ConstMatrixRow &other)
Definition: MatrixRow.h:305
Rcpp::ConstMatrixRow::parent_nrow
int parent_nrow
Definition: MatrixRow.h:331
Rcpp::ConstMatrixRow::const_reference
MATRIX::const_Proxy const_reference
Definition: MatrixRow.h:219
Rcpp::MatrixRow::begin
iterator begin()
Definition: MatrixRow.h:175
RCPP_LOOP_UNROLL_LHSFUN
#define RCPP_LOOP_UNROLL_LHSFUN(TARGET, FUN, SOURCE)
Definition: unroll.h:68
Rcpp::MatrixRow::iter_base::operator>
bool operator>(const iter_base &other)
Definition: MatrixRow.h:113
Rcpp::ConstMatrixRow::iterator
const_iterator iterator
Definition: MatrixRow.h:290
Rcpp::MatrixRow::iter_traits::value_type
traits::r_vector_proxy< RTYPE >::type value_type
Definition: MatrixRow.h:46
Rcpp::MatrixRow::iter_base::operator--
iter_base & operator--()
Definition: MatrixRow.h:86
Rcpp::MatrixRow::begin
const_iterator begin() const
Definition: MatrixRow.h:183
Rcpp::VectorBase::get_ref
VECTOR & get_ref()
Definition: VectorBase.h:37
Rcpp::MatrixRow::iter_base::operator-=
iter_base & operator-=(difference_type n)
Definition: MatrixRow.h:101
Rcpp::ConstMatrixRow::const_iterator
Definition: MatrixRow.h:222
Rcpp::MatrixRow::iter_traits::vector_iterator
traits::r_vector_iterator< RTYPE >::type vector_iterator
Definition: MatrixRow.h:43
Rcpp::traits::r_vector_const_proxy::type
const storage_type< RTYPE >::type & type
Definition: proxy.h:234
Rcpp::Matrix::nrow
int nrow() const
Definition: Matrix.h:97
Rcpp::ConstMatrixRow::end
const_iterator end() const
Definition: MatrixRow.h:320
Rcpp::MatrixRow::size
int size() const
Definition: MatrixRow.h:199
Rcpp::Matrix::Proxy
VECTOR::Proxy Proxy
Definition: Matrix.h:48
Rcpp::MatrixRow::operator=
MatrixRow & operator=(const MatrixRow &rhs)
Definition: MatrixRow.h:161
Rcpp::ConstMatrixRow::parent
const MATRIX & parent
Definition: MatrixRow.h:329
Rcpp
Rcpp API.
Definition: algo.h:28
Rcpp::ConstMatrixRow::const_iterator::operator-
difference_type operator-(const const_iterator &other) const
Definition: MatrixRow.h:258
Rcpp::MatrixRow::iter_base::operator-
difference_type operator-(const iter_base &other)
Definition: MatrixRow.h:121
Rcpp::object
Definition: Module.h:65
Rcpp::MatrixRow::iter_traits::pointer
std::iterator_traits< vector_iterator >::pointer pointer
Definition: MatrixRow.h:48
Rcpp::ConstMatrixRow::const_iterator::operator+
const_iterator operator+(difference_type n) const
Definition: MatrixRow.h:256
Rcpp::ConstMatrixRow::const_iterator::operator->
const pointer operator->()
Definition: MatrixRow.h:266
Rcpp::ConstMatrixRow::const_iterator::pointer
std::iterator_traits< vector_iterator >::pointer pointer
Definition: MatrixRow.h:229
Rcpp::MatrixRow::MatrixRow
MatrixRow(MATRIX &object, int i)
Definition: MatrixRow.h:133
Rcpp::MatrixRow::iter_base::operator-
iter_base operator-(difference_type n) const
Definition: MatrixRow.h:97
Rcpp::Matrix::iterator
VECTOR::iterator iterator
Definition: Matrix.h:44
Rcpp::ConstMatrixRow::const_iterator::index
int index
Definition: MatrixRow.h:287
Rcpp::MatrixRow::const_iter_traits
Definition: MatrixRow.h:52
Rcpp::ConstMatrixRow::const_iterator::value_type
traits::r_vector_const_proxy< RTYPE >::type value_type
Definition: MatrixRow.h:227
Rcpp::MatrixRow::iter_base::difference_type
TRAITS::difference_type difference_type
Definition: MatrixRow.h:66
Rcpp::MatrixRow::const_reference
MATRIX::const_Proxy const_reference
Definition: MatrixRow.h:33
RCPP_DEBUG_4
#define RCPP_DEBUG_4(fmt, M1, M2, M3, M4)
Definition: debug.h:47
Rcpp::ConstMatrixRow::const_iterator::operator+=
const_iterator & operator+=(difference_type n)
Definition: MatrixRow.h:260
Rcpp::MatrixRow::iter_traits
Definition: MatrixRow.h:42
Rcpp::ConstMatrixRow::ConstMatrixRow
ConstMatrixRow(const MATRIX &object, int i)
Definition: MatrixRow.h:292
Rcpp::ConstMatrixRow::const_iterator::vector_iterator
traits::r_vector_iterator< RTYPE >::type vector_iterator
Definition: MatrixRow.h:224
Rcpp::MatrixRow::iter_base
Definition: MatrixRow.h:62
Rcpp::MatrixRow::iter_base::index
int index
Definition: MatrixRow.h:127
Rcpp::ConstMatrixRow::const_iterator::operator--
const_iterator & operator--()
Definition: MatrixRow.h:246
Rcpp::ConstMatrixRow::get_parent_index
int get_parent_index(int i) const
Definition: MatrixRow.h:334
Rcpp::ConstMatrixRow::const_iterator::operator*
const reference operator*()
Definition: MatrixRow.h:263
Rcpp::MatrixRow::iter_traits::reference
value_type reference
Definition: MatrixRow.h:47
Rcpp::MatrixRow::iter_base::iter_base
iter_base(const iter_base &other)
Definition: MatrixRow.h:73
Rcpp::MatrixRow::iter_base::operator[]
reference operator[](int i) const
Definition: MatrixRow.h:117
Rcpp::ConstMatrixRow::row
int row
Definition: MatrixRow.h:332
Rcpp::MatrixRow::iter_base::operator->
pointer operator->()
Definition: MatrixRow.h:106
Rcpp::ConstMatrixRow
Definition: MatrixRow.h:216
Rcpp::MatrixRow::iterator
iter_base< iter_traits > iterator
Definition: MatrixRow.h:130
Rcpp::ConstMatrixRow::begin
const_iterator begin() const
Definition: MatrixRow.h:316
Rcpp::MatrixRow::Proxy
MATRIX::Proxy Proxy
Definition: MatrixRow.h:31
Rcpp::MatrixRow::iter_base::operator*
reference operator*()
Definition: MatrixRow.h:103
Rcpp::ConstMatrixRow::const_iterator::operator--
const_iterator operator--(int)
Definition: MatrixRow.h:250
Rcpp::MatrixRow::iter_base::operator<
bool operator<(const iter_base &other)
Definition: MatrixRow.h:112
Rcpp::MatrixRow::iter_base::operator-
difference_type operator-(const iter_base &other) const
Definition: MatrixRow.h:98
Rcpp::ConstMatrixRow::const_iterator::operator-=
const_iterator & operator-=(difference_type n)
Definition: MatrixRow.h:261
Rcpp::MatrixRow::iter_traits::difference_type
int difference_type
Definition: MatrixRow.h:45
Rcpp::Matrix::const_iterator
VECTOR::const_iterator const_iterator
Definition: Matrix.h:45
Rcpp::MatrixRow::get_parent_index
int get_parent_index(int i) const
Definition: MatrixRow.h:209
Rcpp::ConstMatrixRow::MATRIX
Matrix< RTYPE > MATRIX
Definition: MatrixRow.h:218
Rcpp::MatrixRow::iter_base::operator++
iter_base & operator++()
Definition: MatrixRow.h:76
Rcpp::MatrixRow::iter_base::iterator_category
std::random_access_iterator_tag iterator_category
Definition: MatrixRow.h:71
Rcpp::MatrixRow::parent
MATRIX & parent
Definition: MatrixRow.h:204
Rcpp::ConstMatrixRow::const_iterator::difference_type
int difference_type
Definition: MatrixRow.h:226
Rcpp::MatrixRow::iter_base::operator+=
iter_base & operator+=(difference_type n)
Definition: MatrixRow.h:100
Rcpp::ConstMatrixRow::const_iterator::operator[]
const reference operator[](int i) const
Definition: MatrixRow.h:277
Rcpp::Vector< RTYPE, PreserveStorage >::value_type
traits::r_vector_proxy< RTYPE, PreserveStorage >::type value_type
Definition: Vector.h:45
Rcpp::ConstMatrixRow::size
int size() const
Definition: MatrixRow.h:324
Rcpp::MatrixRow::MATRIX
Matrix< RTYPE > MATRIX
Definition: MatrixRow.h:30
Rcpp::MatrixRow::operator[]
reference operator[](int i)
Definition: MatrixRow.h:167
Rcpp::VectorBase
Definition: VectorBase.h:29
Rcpp::MatrixRow::end
const_iterator end() const
Definition: MatrixRow.h:187
Rcpp::MatrixRow::cend
const_iterator cend() const
Definition: MatrixRow.h:195
Rcpp::ConstMatrixRow::const_iterator::const_iterator
const_iterator(const const_iterator &other)
Definition: MatrixRow.h:233
Rcpp::MatrixRow::value_type
MATRIX::value_type value_type
Definition: MatrixRow.h:34
Rcpp::MatrixRow::const_iter_traits::pointer
std::iterator_traits< vector_iterator >::pointer pointer
Definition: MatrixRow.h:58
Rcpp::ConstMatrixRow::const_iterator::operator>=
bool operator>=(const const_iterator &other)
Definition: MatrixRow.h:275
Rcpp::MatrixRow::parent_nrow
int parent_nrow
Definition: MatrixRow.h:206
Rcpp::MatrixRow::operator=
MatrixRow & operator=(const Rcpp::VectorBase< RT, NA, T > &rhs)
Definition: MatrixRow.h:154
Rcpp::MatrixRow::cbegin
const_iterator cbegin() const
Definition: MatrixRow.h:191
Rcpp::ConstMatrixRow::value_type
MATRIX::value_type value_type
Definition: MatrixRow.h:220
Rcpp::MatrixRow::const_iterator
iter_base< const_iter_traits > const_iterator
Definition: MatrixRow.h:131