Re: [Rcpp-devel] c++ class as argument in rcpp function (using modules)

2011-12-21 Thread Tama Ma
hould I look at, to solve this problem... I could try to help... Best regards, Tama Ma On Dec 21, 2011, at 11:00 PM, Richard Downe wrote: > A slightly hackish, if effective, workaround I've used in this instance is to > have "as<>()" convert a string argument

Re: [Rcpp-devel] wrapping clone() via Rcpp module -- solution

2011-11-15 Thread Tama Ma
, as digging into the source code with no little documentation really takes some time. Any suggestion is welcome. Best regards, Tama Ma === #include #include class dummy { public: ~dummy() {} dummy() {} dummy(double a_) : _a(a_) {} dummy(const dummy

[Rcpp-devel] wrapping clone() via Rcpp module

2011-11-15 Thread Tama Ma
_a(obj_._a) {} dummy clone() const { return dummy(*this); } double a() const { return _a; } private: double _a; }; == #include #include "dummy.hpp" RCPP_MODULE(tamama) { Rcpp::class_("dummy") .default_constructor() .constructor() .metho

[Rcpp-devel] copy constructor

2011-11-14 Thread Tama Ma
have any alternative solutions? Thank you very much. Best regards, Tama Ma (+41 78 640 50 15) pingn...@phys.ethz.ch www.phys.ethz.ch/~pingnang HIT K 31.3 Institut für Theoretische Physik Wolfgang-Pauli-Strasse 27 ETH Hönggerberg 8093 Zürich Switzerland

[Rcpp-devel] Fwd: Wrapping copy constructor in rcpp?

2011-11-04 Thread Tama Ma
(Sorry that I forgot to cc to the list... Here is my message... I just came back from dinner...) Begin forwarded message: > From: Tama Ma > Date: November 4, 2011 5:59:53 PM GMT+01:00 > To: Dirk Eddelbuettel > Subject: Re: [Rcpp-devel] Wrapping copy constructor in rcpp? >

Re: [Rcpp-devel] Wrapping copy constructor in rcpp?

2011-11-04 Thread Tama Ma
Thank you once again. Best regards, Tama Ma On Nov 4, 2011, at 4:48 PM, Dirk Eddelbuettel wrote: > > On 4 November 2011 at 16:08, Tama Ma wrote: > | Dear Rcpp developers, > | > | Maybe my previous email has been ignored. I am asking whether there is > a possibility to wrap t

[Rcpp-devel] Wrapping copy constructor in rcpp?

2011-11-04 Thread Tama Ma
Dear Rcpp developers, Maybe my previous email has been ignored. I am asking whether there is a possibility to wrap the copy constructor in a C++ class via Rcpp? Thank you very much. Best regards, Tama Ma (+41 78 640 50 15) pingn...@phys.ethz.ch www.phys.ethz.ch/~pingnang

Re: [Rcpp-devel] Limit of 20 on length of Rcpp::List::create?

2011-11-01 Thread Tama Ma
(_whatever_); Rcpp::List = Rcpp::as >(_your_favourite_list); Best regards, Tama Ma On Nov 1, 2011, at 9:32 PM, Michael Hannon wrote: > > > Greetings. It appears that there is a limit of 20 items in a list created by; > > Rcpp::List:create > > I.e., the appended c

[Rcpp-devel] wrapping the copy constructor and a mutate() function using rcpp...

2011-10-26 Thread Tama Ma
e" , static_cast::*)() const> (&X::mutate)) ; Is there a fast fix for this? Thank you very much! Best regards, Tama Ma (+41 78 640 50 15) pingn...@phys.ethz.ch www.phys.ethz.ch/~pingnang HIT K 31.3 Institut für Theoretische Physik Wolfgang-Pauli-Strasse 2

Re: [Rcpp-devel] R.e. is std::sort function broken??

2011-09-22 Thread Tama Ma
::counting_iterator(0), boost::counting_iterator(20), std::back_inserter(data)); return Rcpp::wrap(data); However, I do agree with Darren that this is not the place for pure C++ questions. Best regards, Tama Ma On Sep 22, 2011, at 1:59 PM, Darren Cook wrote: >> I think this is the current

Re: [Rcpp-devel] Presentation of Rcpp in Meielisalp

2011-06-29 Thread Tama Ma
Dear Dirk, Thank you! that's great help! I will modify accordingly... Thank you once again! Best regards, Tama Ma On Jun 29, 2011, at 10:53 PM, Dirk Eddelbuettel wrote: > > On 29 June 2011 at 15:35, Dirk Eddelbuettel wrote: > | > | On 29 June 2011 at 22:

[Rcpp-devel] Presentation of Rcpp in Meielisalp

2011-06-29 Thread Tama Ma
/~pingnang/numerical-option-pricing-with-Rcpp.pdf Could I have your opinion on the slides, or is there something in it which you strongly do not allow me to speak on? Thanks for any advice in advance. have a nice day! Thank you very much. Best regards, Tama Ma (たまま / 馬秉能

Re: [Rcpp-devel] Interrupts in compiled code.

2010-12-08 Thread Tama Ma
Ctrl-C for abort? Tama On Dec 8, 2010, at 9:41 PM, Andrew Redd wrote: > I have an MCMC chain that runs entirely in c++ with Rcpp. It sometimes runs > for a vary long time and I want to interrupt it. Is there an efficient easy > way to include catching an interupt signal and either aborting

Re: [Rcpp-devel] Enquire on Rcpp::wrap or equivilant

2010-12-07 Thread Tama Ma
Hi Romain, Thank you very much! BTW, I really like the RCPP_MODULE very much. Please tell me if I can contribute to RCpp as a developer or a helper. Best regards, Tama Ma On Dec 6, 2010, at 7:31 PM, Romain Francois wrote: > Le 05/12/10 20:09, Tama Ma a éc

[Rcpp-devel] Enquire on Rcpp::wrap or equivilant

2010-12-05 Thread Tama Ma
, size_type* n ) { Rcpp::NumericVector Rvec; Rvec.reserve(n); std::copy( *obj , *(obj+n), std::back_inserter(Rvec)); return Rvec; } May I know how I can do this? Thank you very much. Best regards, Tama Ma

Re: [Rcpp-devel] Error detected in Rcpp module wrapper

2010-12-05 Thread Tama Ma
Hi Romain, I agree with you that for fast development, inline looks more attractive. Thank you for sharing! Best regards, Tama Ma On Dec 5, 2010, at 6:09 PM, Romain Francois wrote: > Tama, > > While I'm on the subject (sorry it takes three emails), you mi

Re: [Rcpp-devel] Error detected in Rcpp module wrapper (fixed with patch)

2010-12-05 Thread Tama Ma
Hi, Many thanks. I have also made that replacement from &yes to &yes_arity<0> in the patch. Anyway, this is very helpful! Thank you vey much. Best regards, Tama Ma On Dec 5, 2010, at 5:58 PM, Romain Francois wrote: > Hello, > > I just got bac

Re: [Rcpp-devel] Error detected in Rcpp module wrapper (fixed with patch)

2010-12-05 Thread Tama Ma
Dear Dirk and Romain, Here is my fix. The bug is in l.37 of : instead of: return new Class ; it should be: return new Class() ; Anyway, the patch attached removes this bug. Thank you very much. Best regards, Tama Ma Index: pkg/Rcpp/inst/include/Rcpp/module

Re: [Rcpp-devel] Error detected in Rcpp module wrapper

2010-12-05 Thread Tama Ma
Hi Dirk, On Dec 5, 2010, at 4:02 PM, Dirk Eddelbuettel wrote: > > Hi Tama, > > On 5 December 2010 at 15:36, Tama Ma wrote: > | Dear Rcpp developers, > | > | I have written the following BlackScholesCallFiniteDifference class in > , with the > Rcpp mod

[Rcpp-devel] Error detected in Rcpp module wrapper

2010-12-05 Thread Tama Ma
follows. Is there any quick solution, or can I help? Thank you very much. Best regards, Tama Ma error log === Tama-Mas-MacBook-Pro:R tamama$ R R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-apple

Re: [Rcpp-devel] Loading my own dynamic library using Module ?

2010-12-04 Thread Tama Ma
Dear Romain, This works perfectly! Thank you very much. Best regards, Tama Ma (PS: Thank you for your advice on moving to R packages, and I will read on how to do that.) On Dec 4, 2010, at 11:40 AM, Romain Francois wrote: >> >> Thank you very much. >>

[Rcpp-devel] Loading my own dynamic library using Module ?

2010-12-04 Thread Tama Ma
ank you very much. Best regards, Tama Ma ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] Fwd: Extending

2010-12-03 Thread Tama Ma
Dear Dirk, Good to hear this! Best regards, Tama Ma On Dec 3, 2010, at 10:53 PM, Dirk Eddelbuettel wrote: > > Tama, > > On 3 December 2010 at 15:16, Dirk Eddelbuettel wrote: > | I still get a seg fault in 'R CMD check' for current SVN plus your two > | pa

Re: [Rcpp-devel] Fwd: Extending

2010-12-03 Thread Tama Ma
s RUnit is, anyway I will try to locate where the possible error is. Thank you very much. Best regards, Tama Ma On Dec 3, 2010, at 10:20 PM, Dirk Eddelbuettel wrote: > > Tama, > > BTW r2697 now has both your patches so feel free to work from those. > > Dirk >

[Rcpp-devel] Fwd: Extending

2010-12-03 Thread Tama Ma
Oops, I replied to the wrong email...Tama MaBegin forwarded message:From: Tama Ma <pingn...@phys.ethz.ch>Date: December 3, 2010 10:04:51 PM GMT+01:00To: Romain Francois <rom...@r-enthusiasts.com>Cc: rcpp-devel-requ...@lists.r-forge.r-project.orgSubject: Re: [Rcpp-devel] Extending Dea

Re: [Rcpp-devel] Extending

2010-12-03 Thread Tama Ma
Dear Romain, Here it is. Hope it works fine. Best regards, Tama Ma Index: inst/include/Rcpp/module/Module_generated_class_constructor.h === --- inst/include/Rcpp/module/Module_generated_class_constructor.h (revision

[Rcpp-devel] Extending

2010-12-03 Thread Tama Ma
Thank you very much. Best regards, Tama Ma ETH Zurich Tama Ma Institüt für Theoretische Physik HIT K 31.3 Wolfgang-Pauli-Strasse 27 ETH Hönggerberg 8093 Zürich Switzerland pingn...@itp.phys.ethz.ch www.phys.ethz.ch/~pingnang +41 44 633 76 55 (Office Phone) +41 44 63