corresponding to each C++ function (which could have multiple methods).
This R function would analyze its arguments and call the appropriate
C++ method. Whether or not this will be more efficient probably depends
on the ratio of the number of methods to the number of functions -- if
there are relatively few functions, each with many methods, then it will probably be more efficient.
Whether or not you make your C++ classes, and additionally the inheritance structure, correspond to S3 or S4 classes is another choice. If you define your inheritance structure in your own data structures outside of S3 or S4 mechanisms, then you have the freedom to model the C++ class structure more accurately, e.g., by modeling multiple inheritance.
-- Tony Plate
Ali - wrote:
Following my previous post and the intuitive adivces of Duncan Murdoch, I would like to ask some questions regarding C++ to R mapping.
Initially, it appeared to me that in order to perform this mapping, the existing object-oriented design of R would be a good choice. This could include both the S3 and S4 classes approaches. However, there were replies about some 'other' approaches. I would appreciate it if someone could explaines these other tenchiques. Please note that this C++ ro R mapping should be:
(1) automated -- so there is no manual contribution
(2) able to handle of the order of (at least) 10^3 methods efficiently
Thanks.
______________________________________________ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
______________________________________________ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel