Exemple #1
0
        /// <summary>
        ///     Sets the calculation type
        /// </summary>
        /// <param name="calculator"></param>
        private void SetHeuristictype(AStarHeuristicType calculator)
        {
            switch (calculator)
            {
            case AStarHeuristicType.FastSearch:
                _calculationMethod = CalculateHeuristicFast;
                break;

            case AStarHeuristicType.Between:
                _calculationMethod = CalculateHeuristicBetween;
                break;

            case AStarHeuristicType.ShortestPath:
                _calculationMethod = CalculateHeuristicShortestRoute;
                break;

            case AStarHeuristicType.ExperimentalSearch:
                _calculationMethod = CalculateHeuristicExperimental;
                break;
            }
        }
Exemple #2
0
        /// <summary>
        /// Sets the calculation type
        /// </summary>
        /// <param name="calculator"></param>
        private void setHeuristictype(AStarHeuristicType calculator)
        {
            switch (calculator)
            {
            case AStarHeuristicType.FAST_SEARCH:
                this.CalculationMethod = CalculateHeuristicFast;
                break;

            case AStarHeuristicType.BETWEEN:
                this.CalculationMethod = CalculateHeuristicBetween;
                break;

            case AStarHeuristicType.SHORTEST_PATH:
                this.CalculationMethod = CalculateHeuristicShortestRoute;
                break;

            case AStarHeuristicType.EXPERIMENTAL_SEARCH:
                this.CalculationMethod = CalculateHeuristicExperimental;
                break;
            }
        }