Rcpp Version 0.12.12
Rcpp::sugar::IndexHash< RTYPE > Class Template Reference

#include <IndexHash.h>

Public Types

typedef traits::storage_type< RTYPE >::type STORAGE
 
typedef Vector< RTYPE > VECTOR
 

Public Member Functions

 IndexHash (SEXP table)
 
IndexHashfill ()
 
LogicalVector fill_and_get_duplicated ()
 
template<typename T >
SEXP lookup (const T &vec) const
 
SEXP lookup (const VECTOR &vec) const
 
bool contains (STORAGE val) const
 
int size () const
 
Vector< RTYPE > keys () const
 
template<typename T >
SEXP lookup__impl (const T &vec, int n_) const
 
SEXP get_profile_data ()
 
bool not_equal (const STORAGE &lhs, const STORAGE &rhs)
 
bool add_value (int i)
 
unsigned int get_index (STORAGE value) const
 
unsigned int get_addr (STORAGE value) const
 
template<>
unsigned int get_addr (int value) const
 
template<>
unsigned int get_addr (double val) const
 
template<>
unsigned int get_addr (SEXP value) const
 

Public Attributes

int n
 
int m
 
int k
 
STORAGEsrc
 
int size_
 
int * data
 

Detailed Description

template<int RTYPE>
class Rcpp::sugar::IndexHash< RTYPE >

Definition at line 50 of file IndexHash.h.

Member Typedef Documentation

template<int RTYPE>
typedef traits::storage_type<RTYPE>::type Rcpp::sugar::IndexHash< RTYPE >::STORAGE

Definition at line 52 of file IndexHash.h.

template<int RTYPE>
typedef Vector<RTYPE> Rcpp::sugar::IndexHash< RTYPE >::VECTOR

Definition at line 53 of file IndexHash.h.

Constructor & Destructor Documentation

Member Function Documentation

template<int RTYPE>
bool Rcpp::sugar::IndexHash< RTYPE >::add_value ( int  i)
inline
template<int RTYPE>
bool Rcpp::sugar::IndexHash< RTYPE >::contains ( STORAGE  val) const
inline

Definition at line 102 of file IndexHash.h.

References Rcpp::sugar::IndexHash< RTYPE >::get_index().

Here is the call graph for this function:

template<int RTYPE>
IndexHash& Rcpp::sugar::IndexHash< RTYPE >::fill ( )
inline
template<int RTYPE>
LogicalVector Rcpp::sugar::IndexHash< RTYPE >::fill_and_get_duplicated ( )
inline

Definition at line 85 of file IndexHash.h.

References Rcpp::sugar::IndexHash< RTYPE >::add_value(), Rcpp::sugar::IndexHash< RTYPE >::n, and Rcpp::no_init().

Referenced by Rcpp::duplicated().

Here is the call graph for this function:

template<int RTYPE>
unsigned int Rcpp::sugar::IndexHash< RTYPE >::get_addr ( STORAGE  value) const
template<>
unsigned int Rcpp::sugar::IndexHash< INTSXP >::get_addr ( int  value) const
inline

Definition at line 204 of file IndexHash.h.

References RCPP_HASH.

template<>
unsigned int Rcpp::sugar::IndexHash< REALSXP >::get_addr ( double  val) const
inline

Definition at line 208 of file IndexHash.h.

References RCPP_HASH.

template<>
unsigned int Rcpp::sugar::IndexHash< STRSXP >::get_addr ( SEXP  value) const
inline

Definition at line 225 of file IndexHash.h.

References RCPP_HASH.

template<int RTYPE>
unsigned int Rcpp::sugar::IndexHash< RTYPE >::get_index ( STORAGE  value) const
inline

Definition at line 188 of file IndexHash.h.

References Rcpp::sugar::IndexHash< RTYPE >::get_addr().

Referenced by Rcpp::sugar::IndexHash< RTYPE >::contains(), and Rcpp::sugar::IndexHash< RTYPE >::lookup__impl().

Here is the call graph for this function:

template<int RTYPE>
SEXP Rcpp::sugar::IndexHash< RTYPE >::get_profile_data ( )
inline

Definition at line 155 of file IndexHash.h.

References Rcpp::wrap().

Here is the call graph for this function:

template<int RTYPE>
Vector<RTYPE> Rcpp::sugar::IndexHash< RTYPE >::keys ( ) const
inline

Definition at line 111 of file IndexHash.h.

References Rcpp::sugar::IndexHash< RTYPE >::data, Rcpp::no_init(), Rcpp::sugar::IndexHash< RTYPE >::size_, and Rcpp::sugar::IndexHash< RTYPE >::src.

Referenced by Rcpp::unique().

Here is the call graph for this function:

template<int RTYPE>
template<typename T >
SEXP Rcpp::sugar::IndexHash< RTYPE >::lookup ( const T &  vec) const
inline

Definition at line 93 of file IndexHash.h.

References Rcpp::sugar::IndexHash< RTYPE >::lookup__impl().

Referenced by Rcpp::sugar::IndexHash< RTYPE >::lookup__impl(), and Rcpp::match().

Here is the call graph for this function:

template<int RTYPE>
SEXP Rcpp::sugar::IndexHash< RTYPE >::lookup ( const VECTOR vec) const
inline
template<int RTYPE>
template<typename T >
SEXP Rcpp::sugar::IndexHash< RTYPE >::lookup__impl ( const T &  vec,
int  n_ 
) const
inline
template<int RTYPE>
bool Rcpp::sugar::IndexHash< RTYPE >::not_equal ( const STORAGE lhs,
const STORAGE rhs 
)
inline

Definition at line 163 of file IndexHash.h.

Referenced by Rcpp::sugar::IndexHash< RTYPE >::add_value().

template<int RTYPE>
int Rcpp::sugar::IndexHash< RTYPE >::size ( ) const
inline

Definition at line 106 of file IndexHash.h.

References Rcpp::sugar::IndexHash< RTYPE >::size_.

Member Data Documentation

template<int RTYPE>
int* Rcpp::sugar::IndexHash< RTYPE >::data
template<int RTYPE>
int Rcpp::sugar::IndexHash< RTYPE >::k

Definition at line 119 of file IndexHash.h.

Referenced by Rcpp::sugar::IndexHash< RTYPE >::IndexHash().

template<int RTYPE>
int Rcpp::sugar::IndexHash< RTYPE >::m

Definition at line 119 of file IndexHash.h.

Referenced by Rcpp::sugar::IndexHash< RTYPE >::IndexHash().

template<int RTYPE>
int Rcpp::sugar::IndexHash< RTYPE >::size_
template<int RTYPE>
STORAGE* Rcpp::sugar::IndexHash< RTYPE >::src

Definition at line 120 of file IndexHash.h.

Referenced by Rcpp::sugar::IndexHash< RTYPE >::keys().


The documentation for this class was generated from the following file: