本文整理汇总了Java中org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic类的典型用法代码示例。如果您正苦于以下问题:Java AbstractStorelessUnivariateStatistic类的具体用法?Java AbstractStorelessUnivariateStatistic怎么用?Java AbstractStorelessUnivariateStatistic使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractStorelessUnivariateStatistic类属于org.apache.commons.math3.stat.descriptive包,在下文中一共展示了AbstractStorelessUnivariateStatistic类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStatisticOperation
import org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic; //导入依赖的package包/类
/**
* Given several GenericLogger, calculates an abstract statistic operation of each field registered.
* Results are in the field log of the GenericLogger returned.
*/
public static GenericLogger getStatisticOperation(List<GenericLogger> listOfResults, AbstractStorelessUnivariateStatistic aus){
GenericLogger firstExperiment= listOfResults.get(0);
GenericLogger r= new GenericLogger(firstExperiment.headings);
int steps=firstExperiment.log.size();
for(int i=0;i<steps;i++){//for each step
double resultForOneStep[]= new double[firstExperiment.log.get(0).length];
for(int j=0;j<resultForOneStep.length;j++){//for each property stored in each step
double[] values= new double[listOfResults.size()];
for(int z=0;z< listOfResults.size();z++){//for each experiment
values[z]= listOfResults.get(z).log.get(i)[j];
}
resultForOneStep[j]= aus.evaluate(values);
}
r.log.add(resultForOneStep);
}
return r;
}