我有两个数组
double arr[]=data.attributeToDoubleArray(4);
double arr0[]=data.attributeToDoubleArray(0);
要计算常见 apache 中的 p 值,其记录如下:
public double anovaPValue(Collection<double[]> categoryData)
throws NullArgumentException,
DimensionMismatchException,
ConvergenceException,
MaxCountExceededException
Computes the ANOVA P-value for a collection of double[] arrays.
Preconditions:
The categoryData Collection must contain double[] arrays.
There must be at least two double[] arrays in the categoryData collection and each of these arrays must contain at least two values.
如何转换集合中的两个数组以便我可以使用上述函数?
最佳答案
你可以试试这个:
double arr[]=data.attributeToDoubleArray(4);
double arr0[]=data.attributeToDoubleArray(0);
List<double[]> newArr = Arrays.asList(arr, arr0);
关于java - 如何将 double 组转换为集合?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45071273/