Encog.Neural.Networks.Training.NEAT.NEATGenome.GetElementPos C# (CSharp) Method

GetElementPos() private method

Get the specified neuron's index.
private GetElementPos ( long neuronID ) : int
neuronID long The neuron id to check for.
return int
        private int GetElementPos(long neuronID)
        {

            for (int i = 0; i < Neurons.Genes.Count; i++)
            {
                NEATNeuronGene neuronGene = (NEATNeuronGene)neuronsChromosome.Genes[i];
                if (neuronGene.Id == neuronID)
                {
                    return i;
                }
            }

            return -1;
        }