Re: [Rcpp-devel] fun(Times) with STL

2011-06-04 Thread Douglas Bates
A thinko on my part. Remove the '*' in front of the std::min_element. On Sat, Jun 4, 2011 at 12:52 PM, Silkworth,David J. wrote: > Many thanks, Doug, I feel so-o-o close, but the revised example does not > compile. > I have taken the liberty to condense our discussion a little here. > dou

Re: [Rcpp-devel] fun(Times) with STL

2011-06-04 Thread Wray, Christopher
:52 To: rcpp-de...@r-forge.wu-wien.ac.at Cc: dmba...@gmail.com Subject: Re: [Rcpp-devel] fun(Times) with STL Many thanks, Doug, I feel so-o-o close, but the revised example does not compile. I have taken the liberty to condense our discussion a little here. >>> double* myItera

Re: [Rcpp-devel] fun(Times) with STL

2011-06-04 Thread Silkworth,David J.
--Original Message- From: Dirk Eddelbuettel [mailto:e...@debian.org] Sent: Saturday, June 04, 2011 12:59 PM To: Douglas Bates Cc: Silkworth,David J.; rcpp-de...@r-forge.wu-wien.ac.at Subject: Re: [Rcpp-devel] fun(Times) with STL On 4 June 2011 at 11:37, Douglas Bates wrote: | Dirk

Re: [Rcpp-devel] fun(Times) with STL

2011-06-04 Thread Silkworth,David J.
Many thanks, Doug, I feel so-o-o close, but the revised example does not compile. I have taken the liberty to condense our discussion a little here. >>> double* myIterator = std::min_element (TimeQ.begin(), TimeQ.end()); >> >> The usual idiom is >> >> double TQmin = *std::min_element(TimeQ.begin

Re: [Rcpp-devel] fun(Times) with STL

2011-06-04 Thread Dirk Eddelbuettel
On 4 June 2011 at 11:37, Douglas Bates wrote: | Dirk and Romain recommended the freely-available book "C++ Annotaions" | to me (just google the title to find out where to download it) and Also: edd@max:~$ apt-cache search "c\+\+-annotations" c++-annotations - Extensive tutorial and documentation

Re: [Rcpp-devel] fun(Times) with STL

2011-06-04 Thread Douglas Bates
On Sat, Jun 4, 2011 at 11:26 AM, Douglas Bates wrote: > On Sat, Jun 4, 2011 at 11:08 AM, Silkworth,David J. > wrote: >> I ran into this yesterday as I needed to get the position of the least time >> value in a small Que of times that I had extracted from a more complex >> structure.   I ended up

Re: [Rcpp-devel] fun(Times) with STL

2011-06-04 Thread Douglas Bates
On Sat, Jun 4, 2011 at 11:08 AM, Silkworth,David J. wrote: > I ran into this yesterday as I needed to get the position of the least time > value in a small Que of times that I had extracted from a more complex > structure.   I ended up with this problem during a separate work-around, > which is a

[Rcpp-devel] fun(Times) with STL

2011-06-04 Thread Silkworth,David J.
I ran into this yesterday as I needed to get the position of the least time value in a small Que of times that I had extracted from a more complex structure. I ended up with this problem during a separate work-around, which is a story I'd love to tell also. But, to the point. I explored using S