Beispiel #1
0
        private void RemoveVisit(GraphNodeNavigatorVisit <T> to_remove)
        {
            visits.Remove(to_remove);

            closed_set.Add(to_remove.GetGraphNode());
            open_set.Remove(to_remove.GetGraphNode());
        }
Beispiel #2
0
        private void AddVisit(GraphNodeNavigatorVisit <T> to_add)
        {
            visits.Remove(to_add);

            visits.InsertBefore(to_add, v => to_add.GetTotalScore() < v.GetTotalScore());
            open_set[to_add.GetGraphNode()] = to_add;
        }
Beispiel #3
0
        public override bool IsGoal(GraphNodeNavigatorVisit <T> visit)
        {
            if (visit.GetGraphNode().Equals(goal_node))
            {
                return(true);
            }

            return(false);
        }