Rcpp Version 0.12.12
sample.h File Reference
#include <vector>
Include dependency graph for sample.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Rcpp
 Rcpp API.
 
 Rcpp::sugar
 

Typedefs

typedef Nullable< Vector< REALSXP > > Rcpp::sugar::probs_t
 

Functions

void Rcpp::sugar::Normalize (Vector< REALSXP > &p, int require_k, bool replace)
 
Vector< INTSXP > Rcpp::sugar::SampleReplace (Vector< REALSXP > &p, int n, int k, bool one_based)
 
template<int RTYPE>
Vector< RTYPE > Rcpp::sugar::SampleReplace (Vector< REALSXP > &p, int k, const Vector< RTYPE > &ref)
 
Vector< INTSXP > Rcpp::sugar::WalkerSample (const Vector< REALSXP > &p, int n, int nans, bool one_based)
 
template<int RTYPE>
Vector< RTYPE > Rcpp::sugar::WalkerSample (const Vector< REALSXP > &p, int nans, const Vector< RTYPE > &ref)
 
Vector< INTSXP > Rcpp::sugar::SampleNoReplace (Vector< REALSXP > &p, int n, int nans, bool one_based)
 
template<int RTYPE>
Vector< RTYPE > Rcpp::sugar::SampleNoReplace (Vector< REALSXP > &p, int nans, const Vector< RTYPE > &ref)
 
Vector< INTSXP > Rcpp::sugar::EmpiricalSample (int n, int size, bool replace, bool one_based)
 
template<int RTYPE>
Vector< RTYPE > Rcpp::sugar::EmpiricalSample (int size, bool replace, const Vector< RTYPE > &ref)
 
Vector< INTSXP > Rcpp::sample (int n, int size, bool replace=false, sugar::probs_t probs=R_NilValue, bool one_based=true)
 
template<int RTYPE>
Vector< RTYPE > Rcpp::sample (const Vector< RTYPE > &x, int size, bool replace=false, sugar::probs_t probs=R_NilValue)