ta 2016 23:09
| Vastaanottaja: Dirk Eddelbuettel
| Kopio: Helske, Jouni; rcpp-devel@lists.r-forge.r-project.org
| Aihe: Re: [Rcpp-devel] Initializing Armadillo vec/cube from NumericVector
using as conversion
|
| Oh, and it should work the same for cube types:
|
| R> cppFunction("void test2(arm
r-forge.r-project.org
Aihe: Re: [Rcpp-devel] Initializing Armadillo vec/cube from NumericVector using
as conversion
Oh, and it should work the same for cube types:
R> cppFunction("void test2(arma::cube & x) { x(0,0,0) = 0.5; }",
R> depends="RcppArmadillo")
R> v <
Oh, and it should work the same for cube types:
R> cppFunction("void test2(arma::cube & x) { x(0,0,0) = 0.5; }",
R> depends="RcppArmadillo")
R> v <- array(sqrt(1:8), c(2, 2, 2))
R> v
, , 1
[,1][,2]
[1,] 1.0 1.73205
[2,] 1.41421 2.0
, , 2
[,1][,2]
Hi Jouni,
On 22 September 2016 at 19:39, Helske, Jouni wrote:
| Hi,
|
| I was recently hunting down a bug in my code, and stumbled upon a slightly
| incoherent behaviour in Rcpp/RcppArmadillo. In my real application I have a
| class which data members are initialized in initialization list from
Hi,
I was recently hunting down a bug in my code, and stumbled upon a slightly
incoherent behaviour in Rcpp/RcppArmadillo. In my real application I have a
class which data members are initialized in initialization list from the Rcpp
List using as. For example, I have a member y which I initiali