File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -140,12 +140,17 @@ class matrix {
140
140
141
141
r_vector<r_string> names () const { return SEXP (vector_.names ()); }
142
142
143
- row operator [](const int pos) { return {*this , pos}; }
143
+ row row_at (const int pos) { return {*this , pos}; }
144
+ column column_at (const int pos) { return {*this , pos}; }
144
145
145
- T operator ()(int row, int col) { return vector_[row + (col * nrow_)]; }
146
+ T at (int row, int col) { return vector_[row + (col * nrow_)]; }
147
+ T operator ()(int row, int col) { return at (row, col); }
146
148
147
- row begin () { return {*this , 0 }; }
148
- row end () { return {*this , nrow_}; }
149
+ row rows_begin () { return {*this , 0 }; }
150
+ row rows_end () { return {*this , nrow ()}; }
151
+
152
+ column columns_begin () { return {*this , 0 }; }
153
+ column columns_end () { return {*this , ncol ()}; }
149
154
};
150
155
151
156
using doubles_matrix = matrix<r_vector<double >, double >;
You can’t perform that action at this time.
0 commit comments