Skip to content

Commit 6f7a6ad

Browse files
committed
Add .size method to Row and Column inner classes
1 parent b2e8a91 commit 6f7a6ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

inst/include/RcppParallel/RMatrix.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ class RMatrix {
129129
inline size_t length() const {
130130
return parent_.ncol();
131131
}
132-
132+
133+
inline size_t size() const {
134+
return parent_.ncol();
135+
}
136+
133137
inline T& operator[](std::size_t i) {
134138
return start_[i * parent_.nrow()];
135139
}
@@ -174,6 +178,7 @@ class RMatrix {
174178
inline const_iterator end() const { return end_; }
175179

176180
inline size_t length() const { return end_ - begin_; }
181+
inline size_t size() const { return end_ - begin_; }
177182

178183
inline T& operator[](std::size_t i) {
179184
return *(begin_ + i);

0 commit comments

Comments
 (0)