Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add at accessors with bounds checking#342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
eddelbuettel merged 14 commits intoRcppCore:masterfromfplazaonate:at-accessors-patch
Aug 25, 2015
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Uncomment at accessors
  • Loading branch information
Florian Plaza Oñate committedAug 19, 2015
commitbf34e7b10492b4e078b881ae196a911435133e99
4 changes: 2 additions & 2 deletionsinst/include/Rcpp/vector/Matrix.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -134,14 +134,14 @@ class Matrix : public Vector<RTYPE, StoragePolicy>, public MatrixBase<RTYPE, tru
inline const_Proxy operator()( const size_t& i, const size_t& j) const {
return static_cast< const Vector<RTYPE>* >( this )->operator[]( offset( i, j ) ) ;
}
/*

inline Proxy at( const size_t& i, const size_t& j) {
return static_cast< Vector<RTYPE>* >( this )->operator()( i, j ) ;
}
inline const_Proxy at( const size_t& i, const size_t& j) const {
return static_cast< const Vector<RTYPE>* >( this )->operator()( i, j ) ;
}
*/

inline Row operator()( int i, internal::NamedPlaceHolder ) {
return Row( *this, i ) ;
}
Expand Down
6 changes: 3 additions & 3 deletionsinst/include/Rcpp/vector/Vector.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -318,7 +318,7 @@ class Vector :

inline iterator begin() { return cache.get() ; }
inline iterator end() { return cache.get() + size() ; }
inline const_iterator begin() const{ return cache.get_const() ; }
inline const_iterator begin() const{ return cache.get_const() ; }
inline const_iterator end() const{ return cache.get_const() + size() ; }

inline Proxy operator[]( R_xlen_t i ){ return cache.ref(i) ; }
Expand All@@ -330,14 +330,14 @@ class Vector :
inline const_Proxy operator()( const size_t& i) const {
return cache.ref( offset(i) ) ;
}
/*

inline Proxy at( const size_t& i) {
return cache.ref( offset(i) ) ;
}
inline const_Proxy at( const size_t& i) const {
return cache.ref( offset(i) ) ;
}
*/

inline Proxy operator()( const size_t& i, const size_t& j) {
return cache.ref( offset(i,j) ) ;
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp