search for: grw_permut

Displaying 3 results from an estimated 3 matches for "grw_permut".

Did you mean: grw_permute
2008 Apr 30
8
Why R is 200 times slower than Matlab ?
...und that R is 200 times slower than matlab. Since I am newbie to R, I must be missing some important programming tips. Please help me out on this. Here is the function: ## make the full pair-wise permutation of a vector ## input_fc=c(1,2,3); ## output_fc=( 1 1 1 2 2 2 3 3 3 1 2 3 1 2 3 1 2 3 ); grw_permute = function(input_fc){ fc_vector = input_fc index = 1 k = length(fc_vector) fc_matrix = matrix(0,2,k^2) for(i in 1:k){ for(j in 1:k){ fc_matrix[index] = fc_vector[i] fc_matrix[index+1] = fc_vector[j] index = index+2 } } return(fc_matrix) } For an input vector of size 300. It took...
2008 Apr 30
0
Fwd: Why R is 200 times slower than Matlab ?
...o R, I must be missing some important programming > tips. > > Please help me out on this. > > Here is the function: > ## make the full pair-wise permutation of a vector > ## input_fc=c(1,2,3); > ## output_fc=( > 1 1 1 2 2 2 3 3 3 > 1 2 3 1 2 3 1 2 3 > ); > > grw_permute = function(input_fc){ > > fc_vector = input_fc > > index = 1 > > k = length(fc_vector) > > fc_matrix = matrix(0,2,k^2) > > for(i in 1:k){ > > for(j in 1:k){ > > fc_matrix[index] = fc_vector[i] > > fc_matrix[index+1] = fc_vector[j] > > index...
2008 May 02
1
Speedups with Ra and jit
The topic of Ra and jit has come up on this list recently (see http://www.milbo.users.sonic.net/ra/index.html) so I thought people might be interested in this little demo. For it I used my machine, a 3-year old laptop with 2Gb memory running Windows XP, and the good old convolution example, the same one as used on the web page, (though the code on the web page has a slight glitch in it). This