search for: liao_all

Displaying 1 result from an estimated 1 matches for "liao_all".

2006 Nov 29
1
An example of using rJava
...double[] c = new double[n3]; for(int i=0; i<n1; i++) for(int j=0; j<n2; j++) c[i+j] += a[i]*b[j]; return c; } } Compile the Java code. now inside R library(rJava) #load the rJava library .jinit(classpath="c:/liao_all/importance_sampling/java", parameters="-Xmx512m") #the above is to load the Java virtual machine, "c:/liao_all/importance_sampling/java" is where the java code is. x = runif(1000) y = runif(1000) #the above are two vectors to convolve #now you can call the Java method as...