Displaying 1 result from an estimated 1 matches for "opt_double".
2014 May 02
1
Questions on extending Rcpp wrap and as with templates
...ote this specialization:
template<> SEXP Rcpp::wrap(std::vector<TimedOptDouble> const& entries) {
std::vector<double> sec_times;
std::vector<double> doubles;
for(auto const& entry : entries)
{
sec_times.push_back(entry.GetTime().Seconds());
TimedOptDouble::OptDouble opt_double(entry.GetOptDouble());
if(opt_double)
doubles.push_back(*opt_double);
else
doubles.push_back(R_NaReal);
}
return List::create(
Named( "Time" ) = sec_times,
Named( "Value" ) = doubles);
}
First of all, this returns what I believe to be a Rcpp::List object, which
seems to be conv...