Encog.Neural.Rbf.Training.SVDTraining.FlatToMatrix C# (CSharp) Method

FlatToMatrix() public method

Convert a flat network to a matrix.
public FlatToMatrix ( double flat, int start, double matrix ) : void
flat double The flat network to convert.
start int The starting point.
matrix double The matrix to convert to.
return void
        public void FlatToMatrix(double[] flat, int start,
                                 double[][] matrix)
        {
            int rows = matrix.Length;
            int cols = matrix[0].Length;

            int index = start;

            for (int r = 0; r < rows; r++)
            {
                for (int c = 0; c < cols; c++)
                {
                    matrix[r][c] = flat[index++];
                }
            }
        }