[Rcpp-devel] RcppMLPACK ?

Dirk Eddelbuettel edd at debian.org
Wed Jun 11 15:28:16 CEST 2014


On 11 June 2014 at 08:50, Qiang Kou wrote:
| Thanks for the opinions!

As they say, "talk is cheap" so I dispense it freely :)
 
| On Wed, Jun 11, 2014 at 7:38 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
|     And smart how you just added the little bit from Boost
|     we don't have in BH (program_options).
| 
| As far as I know all parts in BH package are headers-only, and
| "program_options" is required by MLPACK to handle command line options. As I
| see, it will not be used, since we don't need those options when calling it in
| R.

Correct. 

So the best way forward would be to talk to Ryan to ifdef these parts, or
maybe deal with it at your end so that file containing options parsing is not used.

Not including it would be even better as you'd avoid all possible version
skew between BH and your included file. 

|     Should the cpp files in inst/include be in src/, or maybe src/mlpack
|     instead?
| 
| To be frank, I don't know which place is better. I just follow the structures
| of RcppArmadillo.

Not really. Look for carefully: directory inst/include/ for Rcpp,
RcppArmadillo, RcppEigen, BH, ... only include __header__ files whereas you
included source files (ie .cpp). 
 
|     It may be less than ideal that the kmeans example hides the base function.
|     Maybe make it mlKmeans, or keep it unexported, or ... ?
| 
| Of course, I will change names of functions, at least not the same with R
| built-in functions.

Yes. And one fun thing you could play with is to see if you either re-use or
mimic the print, summary, ... methods for kmeans.

A very good start, and good to gave on GitHub!

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list