statistics - Run Smirnov test in Java -
i'm trying run smirnov test in java, see if 2 sets of data come same distribution. however, getting "cannot find symbol" error. how "construct" smirnov test not error?
import java.io.*; import java.util.arrays; import java.util.arraylist; import java.util.list; import java.util.regex.*; import jsc.independentsamples.smirnovtest; import jsc.*; public class test{ public static void main(string[] arg) throws exception { double[] array1 = {1.1,2.2,3.3}; double[] array2 = {1.2,2.3,3.4}; smirnovtest test = smirnovtest(array1, array2); test.getsp(); } }
two possible issues, not mutually exclusive , 1 of them definitely issue.
- your classpath wrong. make sure
jsc.jar
in classpath. - you need invoke constructor
smirnovtest
using instance creation expression requires use of keywordnew
.
that is
smirnovtest test = new smirnovtest(array1, array2); ^^^
the second definitely issue code. without using keyword new
, javac
interpret
smirnovtest test = smirnovtest(array1, array2);
as method invocation , method named smirnovtest
in class test
. don't have it, die cannot find symbol
error, whether or not have imported jsc.jar
.
please fix second if not first of these issues.
Comments
Post a Comment