Accord.Neuro.Learning.EvolutionaryFitness.EvolutionaryFitness C# (CSharp) Method

EvolutionaryFitness() public method

Initializes a new instance of the EvolutionaryFitness class.
Length of inputs and outputs arrays must be equal and greater than 0. Length of each input vector must be equal to neural network's inputs count.
public EvolutionaryFitness ( ActivationNetwork network, double input, double output ) : Accord.Genetic
network ActivationNetwork Neural network for which fitness will be calculated.
input double Input data samples for neural network.
output double Output data sampels for neural network (desired output).
return Accord.Genetic
        public EvolutionaryFitness( ActivationNetwork network, double[][] input, double[][] output )
        {
            if ( ( input.Length == 0 ) || ( input.Length != output.Length ) )
            {
                throw new ArgumentException( "Length of inputs and outputs arrays must be equal and greater than 0." );
            }

            if ( network.InputsCount != input[0].Length )
            {
                throw new ArgumentException( "Length of each input vector must be equal to neural network's inputs count." );
            }

            this.network = network;
            this.input = input;
            this.output = output;
        }