Beispiel #1
0
        private DataView Populate(EquationSolveAnswer answer)
        {
            var result = new double[2, answer.Nodes.Length];

            for (int i = 0; i < answer.Nodes.Length; i++)
            {
                result[0, i] = answer.Nodes[i];
                result[1, i] = answer.LastLayer[i];
            }
            return(BindingHelper.GetBindable2DArray(result));
        }
Beispiel #2
0
        private DataView Populate(double[,] answer)
        {
            int lengthX = answer.GetLength(0);
            int lengthY = answer.GetLength(1);

            var reverted = new double[lengthY, lengthX];

            for (int i = 0; i < lengthX; i++)
            {
                for (int j = 0; j < lengthY; j++)
                {
                    reverted[j, i] = answer[i, lengthY - 1 - j];
                }
            }
            return(BindingHelper.GetBindableDoubleArray(reverted));
        }