We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f81d0a commit 1ab5ad9Copy full SHA for 1ab5ad9
NEWS
@@ -2,6 +2,7 @@ RcppParallel 4.3.9
2
------------------------------------------------------------------------
3
4
* Add support for TBB on Solaris
5
+* Add const and non-const operator[] for RMatrix class
6
7
RcppParallel 4.3.8
8
inst/include/RcppParallel/RMatrix.h
@@ -239,6 +239,14 @@ class RMatrix {
239
return Column(*const_cast<RMatrix*>(this), i);
240
}
241
242
+ inline T& operator[](std::size_t i) {
243
+ return *(data_ + i);
244
+ }
245
+
246
+ inline const T& operator[](std::size_t i) const {
247
248
249
250
private:
251
T* data_;
252
std::size_t nrow_;
0 commit comments