public List <Edge> search(Problem problem)
 {
     switch (problem.Type)
     {
     case ProblemType.SearchShortestPathProblem:
     {
         BidirectionalSearch bs = new BidirectionalSearch();
         return(bs.SynchronousSearch(problem.Graph, problem.Root, problem.Goal).GetShortestPath());
     }
     }
     return(null);
 }
 public List<Edge> search(Problem problem)
 {
     switch (problem.Type)
     {
         case ProblemType.SearchShortestPathProblem:
             {
                 BidirectionalSearch bs = new BidirectionalSearch();
                 return bs.SynchronousSearch(problem.Graph, problem.Root, problem.Goal).GetShortestPath();
             }
     }
     return null;
 }
예제 #3
0
 public void Setup()
 {
     g = new Graph("graph_matrix.txt", "heuristic_data.txt");
     br = new Model.BidirectionalSearch();
     gs = new GreedySearch();
 }