|
Rcpp Version 0.10.3
|
#include <Vector.h>


Classes | |
| class | NamesProxy |
Public Types | |
| typedef traits::r_vector_proxy < RTYPE >::type | Proxy |
| typedef traits::r_vector_const_proxy < RTYPE >::type | const_Proxy |
| typedef traits::r_vector_name_proxy < RTYPE >::type | NameProxy |
| typedef traits::r_vector_proxy < RTYPE >::type | value_type |
| typedef traits::r_vector_iterator < RTYPE >::type | iterator |
| typedef traits::r_vector_const_iterator < RTYPE >::type | const_iterator |
| typedef traits::init_type < RTYPE >::type | init_type |
| typedef traits::r_vector_element_converter < RTYPE >::type | converter_type |
| typedef traits::storage_type < RTYPE >::type | stored_type |
| typedef internal::RangeIndexer < RTYPE, true, Vector > | Indexer |
Public Member Functions | |
| Vector () | |
| ~Vector () | |
| Vector (const Vector &other) | |
| Vector (SEXP x) | |
| Vector (const RObject::SlotProxy &proxy) | |
| Vector (const RObject::AttributeProxy &proxy) | |
| Vector (const int &size, const stored_type &u) | |
| Vector (const std::string &st) | |
| Vector (const int &siz, stored_type(*gen)(void)) | |
| Vector (const int &size) | |
| Vector (const Dimension &dims) | |
| template<typename U > | |
| Vector (const Dimension &dims, const U &u) | |
| template<bool NA, typename VEC > | |
| Vector (const VectorBase< RTYPE, NA, VEC > &other) | |
| template<typename U > | |
| Vector (const int &size, const U &u) | |
| template<bool NA, typename T > | |
| Vector (const sugar::SingleLogicalResult< NA, T > &obj) | |
| template<typename U1 > | |
| Vector (const int &siz, stored_type(*gen)(U1), const U1 &u1) | |
| template<typename U1 , typename U2 > | |
| Vector (const int &siz, stored_type(*gen)(U1, U2), const U1 &u1, const U2 &u2) | |
| template<typename U1 , typename U2 , typename U3 > | |
| Vector (const int &siz, stored_type(*gen)(U1, U2, U3), const U1 &u1, const U2 &u2, const U3 &u3) | |
| template<typename InputIterator > | |
| Vector (InputIterator first, InputIterator last) | |
| template<typename InputIterator > | |
| Vector (InputIterator first, InputIterator last, int n) | |
| template<typename InputIterator , typename Func > | |
| Vector (InputIterator first, InputIterator last, Func func) | |
| template<typename InputIterator , typename Func > | |
| Vector (InputIterator first, InputIterator last, Func func, int n) | |
| Vector & | operator= (const Vector &other) |
| template<typename T > | |
| Vector & | operator= (const T &x) |
| internal::ListInitialization < iterator, init_type > | operator= (init_type x) |
| R_len_t | length () const |
| R_len_t | size () const |
| size_t | offset (const size_t &i, const size_t &j) const |
| size_t | offset (const size_t &i) const |
| R_len_t | offset (const std::string &name) const |
| template<typename U > | |
| void | fill (const U &u) |
| NamesProxy | names () const |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| Proxy | operator[] (int i) |
| const_Proxy | operator[] (int i) const |
| Proxy | operator() (const size_t &i) |
| const_Proxy | operator() (const size_t &i) const |
| Proxy | operator() (const size_t &i, const size_t &j) |
| const_Proxy | operator() (const size_t &i, const size_t &j) const |
| NameProxy | operator[] (const std::string &name) |
| NameProxy | operator() (const std::string &name) |
| NameProxy | operator[] (const std::string &name) const |
| NameProxy | operator() (const std::string &name) const |
| Vector & | sort () |
| template<typename InputIterator > | |
| void | assign (InputIterator first, InputIterator last) |
| template<typename T > | |
| void | push_back (const T &object) |
| template<typename T > | |
| void | push_back (const T &object, const std::string &name) |
| template<typename T > | |
| void | push_front (const T &object) |
| template<typename T > | |
| void | push_front (const T &object, const std::string &name) |
| template<typename T > | |
| iterator | insert (iterator position, const T &object) |
| template<typename T > | |
| iterator | insert (int position, const T &object) |
| iterator | erase (int position) |
| iterator | erase (iterator position) |
| iterator | erase (int first, int last) |
| iterator | erase (iterator first, iterator last) |
| void | update_vector () |
| void | set_sexp (SEXP x) |
| Indexer | operator[] (const Range &range) |
| template<typename EXPR_VEC > | |
| Vector & | operator+= (const VectorBase< RTYPE, true, EXPR_VEC > &rhs) |
| template<typename EXPR_VEC > | |
| Vector & | operator+= (const VectorBase< RTYPE, false, EXPR_VEC > &rhs) |
| bool | containsElementNamed (const char *target) const |
| template<> | |
| Vector (const sugar::SingleLogicalResult< NA, T > &obj) | |
| template<> | |
| Vector< REALSXP > & | operator+= (const VectorBase< REALSXP, false, EXPR_VEC > &rhs) |
| template<> | |
| Vector< REALSXP > & | operator+= (const VectorBase< REALSXP, true, EXPR_VEC > &rhs) |
Static Public Member Functions | |
| static stored_type | get_na () |
| static bool | is_na (stored_type x) |
| template<typename InputIterator > | |
| static Vector | import (InputIterator first, InputIterator last) |
| template<typename InputIterator , typename F > | |
| static Vector | import_transform (InputIterator first, InputIterator last, F f) |
| template<typename U > | |
| static void | replace_element (iterator it, SEXP names, int index, const U &u) |
| template<typename U > | |
| static void | replace_element__dispatch (traits::false_type, iterator it, SEXP names, int index, const U &u) |
| template<typename U > | |
| static void | replace_element__dispatch (traits::true_type, iterator it, SEXP names, int index, const U &u) |
| template<typename U > | |
| static void | replace_element__dispatch__isArgument (traits::false_type, iterator it, SEXP names, int index, const U &u) |
| template<typename U > | |
| static void | replace_element__dispatch__isArgument (traits::true_type, iterator it, SEXP names, int index, const U &u) |
| static Vector | create () |
Protected Member Functions | |
| int * | dims () const |
| void | init () |
Private Member Functions | |
| void | push_back__impl (const stored_type &object, traits::true_type) |
| void | push_back__impl (const stored_type &object, traits::false_type) |
| void | push_back_name__impl (const stored_type &object, const std::string &name, traits::true_type) |
| void | push_back_name__impl (const stored_type &object, const std::string &name, traits::false_type) |
| void | push_front__impl (const stored_type &object, traits::true_type) |
| void | push_front__impl (const stored_type &object, traits::false_type) |
| void | push_front_name__impl (const stored_type &object, const std::string &name, traits::true_type) |
| void | push_front_name__impl (const stored_type &object, const std::string &name, traits::false_type) |
| iterator | insert__impl (iterator position, const stored_type &object, traits::true_type) |
| iterator | insert__impl (iterator position, const stored_type &object, traits::false_type) |
| iterator | erase_single__impl (iterator position) |
| iterator | erase_range__impl (iterator first, iterator last) |
| template<typename T > | |
| void | assign_sugar_expression (const T &x) |
| template<typename T > | |
| void | assign_object (const T &x, traits::true_type) |
| template<typename T > | |
| void | assign_object (const T &x, traits::false_type) |
| template<bool NA, typename VEC > | |
| void | import_sugar_expression (const Rcpp::VectorBase< RTYPE, NA, VEC > &other, traits::false_type) |
| template<bool NA, typename VEC > | |
| void | import_sugar_expression (const Rcpp::VectorBase< RTYPE, NA, VEC > &other, traits::true_type) |
| template<typename T > | |
| void | import_expression (const T &other, int n) |
| template<typename T > | |
| void | fill_or_generate (const T &t) |
| template<typename T > | |
| void | fill_or_generate__impl (const T &gen, traits::true_type) |
| template<typename T > | |
| void | fill_or_generate__impl (const T &t, traits::false_type) |
| template<typename U > | |
| void | fill_dispatch (traits::false_type, const U &u) |
| template<typename U > | |
| void | fill__dispatch (traits::true_type, const U &u) |
Private Attributes | |
| traits::r_vector_cache_type < RTYPE >::type | cache |
| typedef traits::r_vector_const_iterator<RTYPE>::type Vector< RTYPE >::const_iterator |
| typedef traits::r_vector_const_proxy<RTYPE>::type Vector< RTYPE >::const_Proxy |
| typedef traits::r_vector_element_converter<RTYPE>::type Vector< RTYPE >::converter_type |
| typedef internal::RangeIndexer<RTYPE,true,Vector> Vector< RTYPE >::Indexer |
| typedef traits::r_vector_iterator<RTYPE>::type Vector< RTYPE >::iterator |
| typedef traits::r_vector_name_proxy<RTYPE>::type Vector< RTYPE >::NameProxy |
| typedef traits::r_vector_proxy<RTYPE>::type Vector< RTYPE >::Proxy |
| typedef traits::storage_type<RTYPE>::type Vector< RTYPE >::stored_type |
| typedef traits::r_vector_proxy<RTYPE>::type Vector< RTYPE >::value_type |
Default constructor. Creates a vector of the appropriate type and 0 length
Definition at line 28 of file Vector.h.
References Vector< RTYPE >::init(), RCPP_DEBUG, and Vector< RTYPE >::update_vector().
Referenced by Vector< INTSXP >::create(), and Vector< INTSXP >::import_transform().

Destructor. Prints some information id debugging is enabled
Definition at line 35 of file Vector.h.
References RCPP_DEBUG_1.
copy constructor. shallow copy of the SEXP
Definition at line 40 of file Vector.h.
References RCPP_DEBUG_2, and Vector< RTYPE >::update_vector().

|
inline |
|
inline |
Definition at line 52 of file Vector.h.
References Vector< RTYPE >::init(), RCPP_DEBUG_3, and Vector< RTYPE >::update_vector().

Definition at line 59 of file Vector.h.
References Vector< RTYPE >::dims(), Vector< RTYPE >::init(), RCPP_DEBUG_3, sexp_to_name(), and Vector< RTYPE >::update_vector().

| Vector< RTYPE >::Vector | ( | const Dimension & | dims, |
| const U & | u | ||
| ) |
Definition at line 70 of file Vector.h.
References Vector< RTYPE >::dims(), Vector< RTYPE >::fill(), RCPP_DEBUG_2, and Vector< RTYPE >::update_vector().

| Vector< RTYPE >::Vector | ( | const VectorBase< RTYPE, NA, VEC > & | other | ) |
Definition at line 149 of file Vector.h.
References DEMANGLE, Vector< RTYPE >::import_sugar_expression(), and RCPP_DEBUG_2.

Definition at line 81 of file Vector.h.
References Vector< RTYPE >::fill_or_generate(), RCPP_DEBUG_2, and Vector< RTYPE >::update_vector().

| Vector< RTYPE >::Vector | ( | const sugar::SingleLogicalResult< NA, T > & | obj | ) |
| Vector< RTYPE >::Vector | ( | const int & | siz, |
| stored_type(*)(U1) | gen, | ||
| const U1 & | u1 | ||
| ) |
Definition at line 89 of file Vector.h.
References Vector< RTYPE >::begin(), Vector< RTYPE >::end(), RCPP_DEBUG_2, and Vector< RTYPE >::update_vector().

| Vector< RTYPE >::Vector | ( | const int & | siz, |
| stored_type(*)(U1, U2) | gen, | ||
| const U1 & | u1, | ||
| const U2 & | u2 | ||
| ) |
Definition at line 98 of file Vector.h.
References Vector< RTYPE >::begin(), Vector< RTYPE >::end(), RCPP_DEBUG_2, and Vector< RTYPE >::update_vector().

| Vector< RTYPE >::Vector | ( | const int & | siz, |
| stored_type(*)(U1, U2, U3) | gen, | ||
| const U1 & | u1, | ||
| const U2 & | u2, | ||
| const U3 & | u3 | ||
| ) |
Definition at line 107 of file Vector.h.
References Vector< RTYPE >::begin(), Vector< RTYPE >::end(), RCPP_DEBUG_2, and Vector< RTYPE >::update_vector().

| Vector< RTYPE >::Vector | ( | InputIterator | first, |
| InputIterator | last | ||
| ) |
Definition at line 116 of file Vector.h.
References Vector< RTYPE >::begin(), RCPP_DEBUG_1, and Vector< RTYPE >::update_vector().

| Vector< RTYPE >::Vector | ( | InputIterator | first, |
| InputIterator | last, | ||
| int | n | ||
| ) |
Definition at line 124 of file Vector.h.
References Vector< RTYPE >::begin(), RCPP_DEBUG_2, and Vector< RTYPE >::update_vector().

| Vector< RTYPE >::Vector | ( | InputIterator | first, |
| InputIterator | last, | ||
| Func | func | ||
| ) |
Definition at line 132 of file Vector.h.
References Vector< RTYPE >::begin(), RCPP_DEBUG_1, and Vector< RTYPE >::update_vector().

| Vector< RTYPE >::Vector | ( | InputIterator | first, |
| InputIterator | last, | ||
| Func | func, | ||
| int | n | ||
| ) |
Definition at line 140 of file Vector.h.
References Vector< RTYPE >::begin(), RCPP_DEBUG_2, and Vector< RTYPE >::update_vector().

Definition at line 156 of file Vector.h.
References DEMANGLE, RCPP_DEBUG_2, and Vector< RTYPE >::update_vector().

|
inline |
Definition at line 298 of file Vector.h.
Referenced by Vector< INTSXP >::import().
|
inlineprivate |
|
inlineprivate |
Definition at line 192 of file Vector.h.
References Rcpp::wrap().

|
inlineprivate |
Definition at line 171 of file Vector.h.
References n, Rcpp::wrap(), and x.

Reimplemented in Matrix< RTYPE >.
Definition at line 252 of file Vector.h.
Referenced by Matrix< RTYPE >::begin(), Vector< RTYPE >::erase_range__impl(), Vector< RTYPE >::erase_single__impl(), fastLm(), Vector< INTSXP >::fill__dispatch(), Vector< INTSXP >::fill_dispatch(), Vector< RTYPE >::insert__impl(), Rcpp::S4::is(), lapplyCpp(), Rcpp::sugar::IndexHash< RTYPE >::lookup(), Matrix< RTYPE >::Matrix(), Vector< INTSXP >::operator=(), Vector< RTYPE >::push_back__impl(), Vector< RTYPE >::push_back_name__impl(), Vector< RTYPE >::push_front__impl(), Vector< RTYPE >::push_front_name__impl(), Vector< INTSXP >::Vector(), and Vector< RTYPE >::Vector().
|
inline |
Reimplemented in Matrix< RTYPE >.
| bool Vector< RTYPE >::containsElementNamed | ( | const char * | target | ) | const |
Does this vector have an element with the target name
Definition at line 712 of file Vector.h.
References i, n, and RCPP_GET_NAMES.
Reimplemented in Rcpp::DataFrame.
|
inlineprotected |
Definition at line 437 of file Vector.h.
Referenced by Matrix< RTYPE >::cols(), Matrix< RTYPE >::ncol(), Vector< INTSXP >::offset(), and Vector< RTYPE >::Vector().
Reimplemented in Matrix< RTYPE >.
Definition at line 253 of file Vector.h.
Referenced by Matrix< RTYPE >::end(), Vector< INTSXP >::fill__dispatch(), Rcpp::S4::is(), lapplyCpp(), Vector< INTSXP >::Vector(), and Vector< RTYPE >::Vector().
|
inline |
Reimplemented in Matrix< RTYPE >.
|
private |
Definition at line 282 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, PROTECT(), R_NilValue, and RCPP_GET_NAMES.
Referenced by Vector< INTSXP >::erase().

|
private |
Definition at line 241 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.
Referenced by Vector< INTSXP >::erase().

Definition at line 194 of file Vector.h.
Referenced by Vector< INTSXP >::fill__dispatch(), Vector< INTSXP >::Vector(), and Vector< RTYPE >::Vector().
|
inlineprivate |
Definition at line 508 of file Vector.h.
Referenced by Vector< INTSXP >::fill().
|
inlineprivate |
|
inlineprivate |
Definition at line 222 of file Vector.h.
Referenced by Vector< RTYPE >::Vector().
|
inlineprivate |
|
inlineprivate |
|
inlinestatic |
|
inlineprivate |
Definition at line 215 of file Vector.h.
References RCPP_LOOP_UNROLL.
|
inlineprivate |
Definition at line 199 of file Vector.h.
References DEMANGLE, Rcpp::VectorBase< RTYPE, na, VECTOR >::get_ref(), n, RCPP_DEBUG_4, and Rcpp::VectorBase< RTYPE, na, VECTOR >::size().
Referenced by Vector< RTYPE >::Vector().

|
inlineprivate |
Definition at line 208 of file Vector.h.
References DEMANGLE, Rcpp::VectorBase< RTYPE, na, VECTOR >::get_ref(), and RCPP_DEBUG_4.

|
inlineprotected |
Definition at line 441 of file Vector.h.
Referenced by Matrix< RTYPE >::Matrix(), and Vector< RTYPE >::Vector().
|
inline |
Definition at line 347 of file Vector.h.
Referenced by compileAttributes().
|
private |
Definition at line 610 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.
Referenced by Vector< INTSXP >::insert().

|
private |
Definition at line 568 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.

|
inlinestatic |
|
inline |
|
inline |
Definition at line 248 of file Vector.h.
Referenced by lapplyCpp(), and Vector< INTSXP >::offset().
|
inline |
offset based on the dimensions of this vector
Definition at line 161 of file Vector.h.
Referenced by Vector< INTSXP >::operator()().
|
inline |
|
inline |
|
inline |
Reimplemented in Matrix< RTYPE >.
|
inline |
Reimplemented in Matrix< RTYPE >.
| Vector< RTYPE > & Vector< RTYPE >::operator+= | ( | const VectorBase< RTYPE, true, EXPR_VEC > & | rhs | ) |
| Vector< RTYPE > & Vector< RTYPE >::operator+= | ( | const VectorBase< RTYPE, false, EXPR_VEC > & | rhs | ) |
| Vector< REALSXP > & Vector< REALSXP >::operator+= | ( | const VectorBase< REALSXP, false, EXPR_VEC > & | rhs | ) |
| Vector< REALSXP > & Vector< REALSXP >::operator+= | ( | const VectorBase< REALSXP, true, EXPR_VEC > & | rhs | ) |
Reimplemented in Matrix< RTYPE >.
|
inline |
Reimplemented in Matrix< RTYPE >.
|
inline |
Definition at line 320 of file Vector.h.
Referenced by Rcpp::attributes::SourceFileAttributesParser::parseSignature(), and Rcpp::attributes::SourceFileAttributesParser::SourceFileAttributesParser().
|
inline |
|
private |
Definition at line 351 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.
Referenced by Vector< INTSXP >::push_back().

|
private |
Definition at line 324 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.

|
private |
Definition at line 411 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.
Referenced by Vector< INTSXP >::push_back().

|
private |
Definition at line 380 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.

|
inline |
|
inline |
|
private |
Definition at line 471 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.
Referenced by Vector< INTSXP >::push_front().

|
private |
Definition at line 443 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.

|
private |
Definition at line 534 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.
Referenced by Vector< INTSXP >::push_front().

|
private |
Definition at line 501 of file Vector.h.
References Vector< RTYPE >::begin(), end, i, n, PROTECT(), R_NilValue, and RCPP_GET_NAMES.

|
inlinestatic |
Definition at line 389 of file Vector.h.
Referenced by Vector< INTSXP >::replace_element().
|
inlinestatic |
Definition at line 399 of file Vector.h.
Referenced by Vector< INTSXP >::replace_element__dispatch().
|
inline |
Definition at line 414 of file Vector.h.
Referenced by Vector< RTYPE >::NamesProxy::set().
|
inline |
alias of length
Definition at line 156 of file Vector.h.
Referenced by convolve(), convolve11cpp(), convolve14cpp(), convolve5cpp(), Vector< INTSXP >::end(), fastLm(), Vector< INTSXP >::fill_dispatch(), lapplyCpp(), Rcpp::sugar::IndexHash< RTYPE >::lookup(), Vector< INTSXP >::offset(), Rcpp::attributes::SourceFileAttributesParser::parseAttribute(), Rcpp::attributes::SourceFileAttributesParser::parseSignature(), Vector< RTYPE >::NamesProxy::set(), and Vector< INTSXP >::sort().
Definition at line 288 of file Vector.h.
Referenced by Vector< INTSXP >::sort().
|
inline |
Definition at line 377 of file Vector.h.
Referenced by Vector< INTSXP >::set_sexp(), Matrix< RTYPE >::update_matrix(), Vector< RTYPE >::Vector(), and Vector< INTSXP >::Vector().
|
private |
Definition at line 36 of file Vector.h.
Referenced by Vector< INTSXP >::begin(), Vector< INTSXP >::end(), Vector< INTSXP >::erase(), Vector< INTSXP >::insert(), Vector< INTSXP >::operator()(), Vector< INTSXP >::operator[](), and Vector< INTSXP >::update_vector().