i am currently writing a little ai. This ai needs a lot of data (around 2.7 million). The easy way of giving the libary the input and expected output is by doing the following:
Double[][] Expected =
{
new[] {0.0},
new[] {0.0},
new[] {0.0},
new[] {0.0},
new[] {1.0},
new[] {1.0},
new[] {1.0},
new[] {1.0}
};
Because i need 2.7 million arrays in this array, i wrote a little function to do that:
private static double[][] getIdeal()
{
double[][] ideal = new double[2798029][];
for(int i = 0; i < ideal.Length; i++)
{
if (i < 1727310)
{
ideal[0][i] = 0.0; <-- Index Out of Range Exception
}
else
{
ideal[0][i] = 0.0;
}
}
return ideal;
}
But it throws Out of Range Exception. I think something with the formatting of the initzialization of the variable ideal is wrong, but i don't know what. I want an array with the size of 2798029 with arrays of the size 1 in it. Then i want to set some values of the arrays in the array to 0, the other ones to one. I hope that explains everything.
Thanks you