Пример #1
0
 private double[][] ConvertData(Dataset dataset)
 {
     double[][] dates = new double[dataset.GetData().Count][];
     for (int i = 0; i < dataset.GetData().Count; i++)
     {
         dates[i] = new double[dataset.GetData()[i].Count];
         for (int j = 0; j < dataset.GetData()[i].Count; j++)
         {
             dates[i][j] = dataset.GetData()[i][j];
         }
     }
     return(dates);
 }
Пример #2
0
        private double[][] ConvertData(Dataset dataset)
        {
            int rows = dataset.GetData().Count;

            double[][] data = new double[rows][];
            for (int i = 0; i < rows; i++)
            {
                data[i] = new double[dataset.GetData()[i].Count];
                for (int j = 0; j < dataset.GetData()[i].Count; j++)
                {
                    data[i][j] = dataset.GetData()[i][j];
                }
            }

            return(data);
        }
Пример #3
0
        public double[][] ConvertData(Dataset dataset)
        {
            IList <List <double> > matrixList = dataset.GetData();

            double[][] matrix = new double[matrixList.Count][];
            for (int i = 0; i < matrixList.Count; i++)
            {
                matrix[i] = new double[matrixList[i].Count];
            }

            for (int i = 0; i < matrixList.Count; i++)
            {
                for (int j = 0; j < matrixList[i].Count; j++)
                {
                    matrix[i][j] = matrixList[i][j];
                }
            }

            return(matrix);
        }