I've imported the Apache Common Math library to use normal distribution. But it isn't working. The error is that it cannot be accessed outside of the package.
I'm unable to import the normalDistributionCDFAlgorithm library.
public void calc1()
{
if (normDist1.getText().toString().equals(""))
{
//do nothing
}
else
{
double mean = Double.parseDouble(meanTxt.toString());
double standDevi = Double.parseDouble(standDeviTxt.toString());
double userInput = Double.parseDouble(normDistTxt1.toString());
double answer;
NormalDistribution d ;
if (tglbool1)
{
//> greater than
d = new NormalDistribution(mean,standDevi);
answer = d.cumulativeProbability(1000);
}
}
答案 0 :(得分:1)
I don't know about this library but I suspect you have not added the jar to your project. To do so you should:
Edit: Turns out you can also do the following:
dependencies {
compile 'org.apache.commons:commons-math3:3.6.1'
}