Rcpp Version 1.1.2
Loading...
Searching...
No Matches
Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION > Class Template Reference

#include <sapply.h>

Inheritance diagram for Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >:
Collaboration diagram for Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >:

Public Types

typedef ::Rcpp::traits::result_of< Function, T >::type result_type
typedef Rcpp::VectorBase< RTYPE, NA, T > VEC
typedef Rcpp::traits::r_vector_element_converter< RESULT_R_TYPE >::type converter_type
typedef Rcpp::traits::storage_type< RESULT_R_TYPE >::type STORAGE
typedef Rcpp::traits::Extractor< RTYPE, NA, T >::type EXT
Public Types inherited from Rcpp::VectorBase< Rcpp::traits::r_sexptype_traits< ::Rcpp::traits::result_of< Function, T >::type >::rtype, true, Sapply< RTYPE, NA, T, Function, NO_CONVERSION > >
typedef traits::storage_type< RTYPE >::type stored_type
typedef traits::storage_type< RTYPE >::type elem_type
typedef iter_base< iter_traits > iterator
typedef iter_base< const_iter_traits > const_iterator

Public Member Functions

 Sapply (const VEC &vec_, Function fun_)
STORAGE operator[] (R_xlen_t i) const
R_xlen_t size () const
Public Member Functions inherited from Rcpp::VectorBase< Rcpp::traits::r_sexptype_traits< ::Rcpp::traits::result_of< Function, T >::type >::rtype, true, Sapply< RTYPE, NA, T, Function, NO_CONVERSION > >
Sapply< RTYPE, NA, T, Function, NO_CONVERSION > & get_ref ()
stored_type operator[] (R_xlen_t i) const
R_xlen_t size () const
const_iterator begin () const
const_iterator end () const
const_iterator cbegin () const
const_iterator cend () const

Static Public Attributes

static const int RESULT_R_TYPE

Private Attributes

const EXTvec
Function fun

Detailed Description

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
class Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >

Definition at line 29 of file sapply.h.

Member Typedef Documentation

◆ converter_type

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
typedef Rcpp::traits::r_vector_element_converter<RESULT_R_TYPE>::type Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::converter_type

Definition at line 42 of file sapply.h.

◆ EXT

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
typedef Rcpp::traits::Extractor<RTYPE,NA,T>::type Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::EXT

Definition at line 45 of file sapply.h.

◆ result_type

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
typedef ::Rcpp::traits::result_of<Function,T>::type Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::result_type

Definition at line 37 of file sapply.h.

◆ STORAGE

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
typedef Rcpp::traits::storage_type<RESULT_R_TYPE>::type Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::STORAGE

Definition at line 43 of file sapply.h.

◆ VEC

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
typedef Rcpp::VectorBase<RTYPE,NA,T> Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::VEC

Definition at line 41 of file sapply.h.

Constructor & Destructor Documentation

◆ Sapply()

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::Sapply ( const VEC & vec_,
Function fun_ )
inline

Member Function Documentation

◆ operator[]()

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
STORAGE Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::operator[] ( R_xlen_t i) const
inline

Definition at line 52 of file sapply.h.

References fun, Rcpp::internal::element_converter< RTYPE >::get(), and vec.

Here is the call graph for this function:

◆ size()

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
R_xlen_t Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::size ( ) const
inline

Definition at line 56 of file sapply.h.

References vec.

Member Data Documentation

◆ fun

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
Function Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::fun
private

◆ RESULT_R_TYPE

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
const int Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::RESULT_R_TYPE
static

◆ vec

template<int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
const EXT& Rcpp::sugar::Sapply< RTYPE, NA, T, Function, NO_CONVERSION >::vec
private

Definition at line 59 of file sapply.h.

Referenced by operator[](), Sapply(), and size().


The documentation for this class was generated from the following file:
  • inst/include/Rcpp/sugar/functions/sapply.h