簡體   English   中英

如何將雙數組轉換為集合?

[英]how to convert double array to collection?

我有兩個數組

   double arr[]=data.attributeToDoubleArray(4);
   double arr0[]=data.attributeToDoubleArray(0);

要計算常用ap中的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);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM