Rcpp classes and methods