Rcpp Version 1.1.2
Loading...
Searching...
No Matches
Rcpp::sugar::detail Namespace Reference

Classes

struct  RowSumsReturn
struct  RowSumsReturn< LGLSXP >
struct  ColSumsReturn
struct  RowMeansReturn
struct  RowMeansReturn< CPLXSXP >
struct  ColMeansReturn

Functions

void incr (double *lhs, double rhs)
void incr (int *lhs, int rhs)
void incr (Rcomplex *lhs, const Rcomplex &rhs)
void div (double *lhs, R_xlen_t rhs)
void div (Rcomplex *lhs, R_xlen_t rhs)
void set_nan (double *x)
void set_nan (Rcomplex *x)
bool isws (const char c)
const char * trim_left (const char *str)
const char * trim_right (const char *str, R_len_t sz, std::string *buff)
const char * trim_both (const char *str, R_len_t sz, std::string *buff)
void stop_overflow (const char *caller)
template<typename T>
std::enable_if< std::is_integral< T >::value, T >::type safe_add (T a, T b, const char *caller=nullptr)
template<typename T>
std::enable_if<!std::is_integral< T >::value, T >::type safe_add (T a, T b, const char *caller=nullptr)
template<typename T>
std::enable_if< std::is_integral< T >::value, T >::type safe_sub (T a, T b, const char *caller=nullptr)
template<typename T>
std::enable_if<!std::is_integral< T >::value, T >::type safe_sub (T a, T b, const char *caller=nullptr)
template<typename T>
std::enable_if< std::is_integral< T >::value, T >::type safe_mul (T a, T b, const char *caller=nullptr)
template<typename T>
std::enable_if<!std::is_integral< T >::value, T >::type safe_mul (T a, T b, const char *caller=nullptr)

Function Documentation

◆ div() [1/2]

◆ div() [2/2]

void Rcpp::sugar::detail::div ( Rcomplex * lhs,
R_xlen_t rhs )
inline

Definition at line 49 of file rowSums.h.

◆ incr() [1/3]

◆ incr() [2/3]

void Rcpp::sugar::detail::incr ( int * lhs,
int rhs )
inline

Definition at line 35 of file rowSums.h.

References RCPP_SAFE_ADD.

◆ incr() [3/3]

void Rcpp::sugar::detail::incr ( Rcomplex * lhs,
const Rcomplex & rhs )
inline

Definition at line 39 of file rowSums.h.

◆ isws()

bool Rcpp::sugar::detail::isws ( const char c)
inline

Definition at line 36 of file trimws.h.

Referenced by trim_both(), trim_left(), and trim_right().

◆ safe_add() [1/2]

template<typename T>
std::enable_if<!std::is_integral< T >::value, T >::type Rcpp::sugar::detail::safe_add ( T a,
T b,
const char * caller = nullptr )
inline

Definition at line 71 of file safe_math.h.

◆ safe_add() [2/2]

template<typename T>
std::enable_if< std::is_integral< T >::value, T >::type Rcpp::sugar::detail::safe_add ( T a,
T b,
const char * caller = nullptr )
inline

Definition at line 50 of file safe_math.h.

References stop_overflow().

Here is the call graph for this function:

◆ safe_mul() [1/2]

template<typename T>
std::enable_if<!std::is_integral< T >::value, T >::type Rcpp::sugar::detail::safe_mul ( T a,
T b,
const char * caller = nullptr )
inline

Definition at line 126 of file safe_math.h.

◆ safe_mul() [2/2]

template<typename T>
std::enable_if< std::is_integral< T >::value, T >::type Rcpp::sugar::detail::safe_mul ( T a,
T b,
const char * caller = nullptr )
inline

Definition at line 102 of file safe_math.h.

References stop_overflow().

Here is the call graph for this function:

◆ safe_sub() [1/2]

template<typename T>
std::enable_if<!std::is_integral< T >::value, T >::type Rcpp::sugar::detail::safe_sub ( T a,
T b,
const char * caller = nullptr )
inline

Definition at line 97 of file safe_math.h.

◆ safe_sub() [2/2]

template<typename T>
std::enable_if< std::is_integral< T >::value, T >::type Rcpp::sugar::detail::safe_sub ( T a,
T b,
const char * caller = nullptr )
inline

Definition at line 76 of file safe_math.h.

References stop_overflow().

Here is the call graph for this function:

◆ set_nan() [1/2]

void Rcpp::sugar::detail::set_nan ( double * x)
inline

◆ set_nan() [2/2]

void Rcpp::sugar::detail::set_nan ( Rcomplex * x)
inline

Definition at line 59 of file rowSums.h.

◆ stop_overflow()

void Rcpp::sugar::detail::stop_overflow ( const char * caller)
inline

Definition at line 41 of file safe_math.h.

References Rcpp::stop().

Referenced by safe_add(), safe_mul(), and safe_sub().

Here is the call graph for this function:

◆ trim_both()

const char * Rcpp::sugar::detail::trim_both ( const char * str,
R_len_t sz,
std::string * buff )
inline

Definition at line 66 of file trimws.h.

References isws().

Referenced by Rcpp::trimws(), Rcpp::trimws(), and Rcpp::trimws().

Here is the call graph for this function:

◆ trim_left()

const char * Rcpp::sugar::detail::trim_left ( const char * str)
inline

Definition at line 40 of file trimws.h.

References isws().

Referenced by Rcpp::trimws(), Rcpp::trimws(), and Rcpp::trimws().

Here is the call graph for this function:

◆ trim_right()

const char * Rcpp::sugar::detail::trim_right ( const char * str,
R_len_t sz,
std::string * buff )
inline

Definition at line 52 of file trimws.h.

References isws().

Referenced by Rcpp::trimws(), Rcpp::trimws(), and Rcpp::trimws().

Here is the call graph for this function: