/// <summary>
        ///
        /// </summary>
        /// <param name="indiv"></param>
        private static void Mutate(Individual indiv)
        {
            Random rndgen = new Random();

            for (int i = 0; i < indiv.Size(); i++)
            {
                if (rndgen.NextDouble() <= mutationRate)
                {
                    byte gene = (byte)Math.Round((float)rndgen.NextDouble());
                    indiv.SetGene(i, gene);
                }
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="individual"></param>
        /// <returns></returns>
        public static int GetFitness(Individual individual)
        {
            int fitness = 0;

            for (int i = 0; i < individual.Size() && i < solution.Length; i++)
            {
                if (individual.GetGene(i) == solution[i])
                {
                    fitness++;
                }
            }
            return(fitness);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="indiv1"></param>
        /// <param name="indiv2"></param>
        /// <returns></returns>
        private static Individual Crossover(Individual indiv1, Individual indiv2)
        {
            Individual newSolution = new Individual();
            Random     rndgen      = new Random();

            for (int i = 0; i < indiv1.Size(); i++)
            {
                if (rndgen.NextDouble() <= uniformRate)
                {
                    newSolution.SetGene(i, indiv1.GetGene(i));
                }
                else
                {
                    newSolution.SetGene(i, indiv2.GetGene(i));
                }
            }
            return(newSolution);
        }