Rcpp Version 1.1.2
Loading...
Searching...
No Matches
Rcpp::sugar::SelfHash< RTYPE > Class Template Reference

#include <SelfHash.h>

Public Types

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

Public Member Functions

 SelfHash (SEXP table)
IntegerVector fill_and_self_match ()
int size () const
STORAGE normalize (STORAGE val) const
bool not_equal (const STORAGE &lhs, const STORAGE &rhs)
int add_value_get_index (int i)
unsigned int get_index (STORAGE value) const
unsigned int get_addr (STORAGE value) const
double normalize (double val) const
unsigned int get_addr (int value) const
unsigned int get_addr (double val) const
unsigned int get_addr (SEXP value) const

Public Attributes

int n
int m
int k
STORAGEsrc
std::vector< int > data
std::vector< int > indices
int size_

Detailed Description

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

Definition at line 33 of file SelfHash.h.

Member Typedef Documentation

◆ STORAGE

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

Definition at line 35 of file SelfHash.h.

◆ VECTOR

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

Definition at line 36 of file SelfHash.h.

Constructor & Destructor Documentation

◆ SelfHash()

template<int RTYPE>
Rcpp::sugar::SelfHash< RTYPE >::SelfHash ( SEXP table)
inline

Definition at line 38 of file SelfHash.h.

References data, dataptr(), indices, k, m, n, size_, src, and Rcpp::table().

Here is the call graph for this function:

Member Function Documentation

◆ add_value_get_index()

template<int RTYPE>
int Rcpp::sugar::SelfHash< RTYPE >::add_value_get_index ( int i)
inline

Definition at line 70 of file SelfHash.h.

References data, get_addr(), indices, m, normalize(), not_equal(), size_, and src.

Referenced by fill_and_self_match().

Here is the call graph for this function:

◆ fill_and_self_match()

template<int RTYPE>
IntegerVector Rcpp::sugar::SelfHash< RTYPE >::fill_and_self_match ( )
inline

Definition at line 47 of file SelfHash.h.

References add_value_get_index(), n, and Rcpp::no_init().

Referenced by Rcpp::self_match().

Here is the call graph for this function:

◆ get_addr() [1/4]

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

Definition at line 114 of file SelfHash.h.

References RCPP_HASH.

◆ get_addr() [2/4]

unsigned int Rcpp::sugar::SelfHash< INTSXP >::get_addr ( int value) const
inline

Definition at line 110 of file SelfHash.h.

References RCPP_HASH.

◆ get_addr() [3/4]

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

Definition at line 127 of file SelfHash.h.

References RCPP_HASH.

◆ get_addr() [4/4]

template<int RTYPE>
unsigned int Rcpp::sugar::SelfHash< RTYPE >::get_addr ( STORAGE value) const

Referenced by add_value_get_index(), and get_index().

◆ get_index()

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

Definition at line 85 of file SelfHash.h.

References data, get_addr(), m, and src.

Here is the call graph for this function:

◆ normalize() [1/2]

double Rcpp::sugar::SelfHash< REALSXP >::normalize ( double val) const
inline

Definition at line 101 of file SelfHash.h.

◆ normalize() [2/2]

template<int RTYPE>
STORAGE Rcpp::sugar::SelfHash< RTYPE >::normalize ( STORAGE val) const
inline

Definition at line 64 of file SelfHash.h.

Referenced by add_value_get_index(), and not_equal().

◆ not_equal()

template<int RTYPE>
bool Rcpp::sugar::SelfHash< RTYPE >::not_equal ( const STORAGE & lhs,
const STORAGE & rhs )
inline

Definition at line 66 of file SelfHash.h.

References normalize().

Referenced by add_value_get_index().

Here is the call graph for this function:

◆ size()

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

Definition at line 54 of file SelfHash.h.

References size_.

Member Data Documentation

◆ data

template<int RTYPE>
std::vector<int> Rcpp::sugar::SelfHash< RTYPE >::data

Definition at line 60 of file SelfHash.h.

Referenced by add_value_get_index(), get_index(), and SelfHash().

◆ indices

template<int RTYPE>
std::vector<int> Rcpp::sugar::SelfHash< RTYPE >::indices

Definition at line 61 of file SelfHash.h.

Referenced by add_value_get_index(), and SelfHash().

◆ k

template<int RTYPE>
int Rcpp::sugar::SelfHash< RTYPE >::k

Definition at line 58 of file SelfHash.h.

Referenced by SelfHash().

◆ m

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

Definition at line 58 of file SelfHash.h.

Referenced by add_value_get_index(), get_index(), and SelfHash().

◆ n

template<int RTYPE>
int Rcpp::sugar::SelfHash< RTYPE >::n

Definition at line 58 of file SelfHash.h.

Referenced by fill_and_self_match(), and SelfHash().

◆ size_

template<int RTYPE>
int Rcpp::sugar::SelfHash< RTYPE >::size_

Definition at line 62 of file SelfHash.h.

Referenced by add_value_get_index(), SelfHash(), and size().

◆ src

template<int RTYPE>
STORAGE* Rcpp::sugar::SelfHash< RTYPE >::src

Definition at line 59 of file SelfHash.h.

Referenced by add_value_get_index(), get_index(), and SelfHash().


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