private State DeleteEdges(State state, int row, int col)
        {
            state.GetCityTo()[row]   = col;
            state.GetCityFrom()[col] = row;
            state.SetCitiesInSolution(state.GetCitiesInSolution() + 1);

            if (state.GetCitiesInSolution() < _cities.Length - 1)
            {
                int start = row;
                int end   = col;

                while (state.GetCityFrom()[start] != -1)
                {
                    start = state.GetCityFrom()[start];
                }

                while (state.GetCityTo()[end] != -1)
                {
                    end = state.GetCityTo()[end];
                }

                while (start != col)
                {
                    state.Matrix.GetMatrix()[end, start] = double.PositiveInfinity;
                    state.Matrix.GetMatrix()[col, start] = double.PositiveInfinity;

                    start = state.GetCityTo()[start];
                }
            }

            return(state);
        }
        private bool IsSolution(State child)
        {
            if (child.GetCitiesInSolution() == _cities.Length)
            {
                return(true);
            }

            if (child.GetCitiesInSolution() > _cities.Length)
            {
                throw new Exception("There should never be more cities in the solution than cities themselves.");
            }

            return(false);
        }