예제 #1
0
 private static Dijkstra <TCell, TMid> Build <TCell, TMid>(this IDijkstra <TCell, TMid> dijkstra)
 {
     return(new()
     {
         Neighbors = dijkstra.GetNeighbors,
         Distance = dijkstra.GetWeight,
         Cell = dijkstra.GetNeighbor
     });
 }
        public DijkstraAlgorithm(IGraph graph)
        {
            InitializeComponent();

            this.dijkstra = new Dijkstra(graph);

            this.currentStep = DEFAULT_CURRENT_STEP;
            this.isFinished  = DEFAULT_IS_FINISHED;
            this.isReachable = DEFAULT_IS_REACHABLE;

            this.dijkstra.Step0();
        }
예제 #3
0
 public static Dictionary <TCell, (int Dist, TCell From)> DijkstraFrom <TCell, TMid>(this IDijkstra <TCell, TMid> dijkstra, TCell start, Func <TCell, bool> valid = null)
 {
     return(dijkstra.Build().ComputeFrom(start, valid));
예제 #4
0
 public static Dictionary <TCell, int> DijkstraWhere <TCell, TMid>(this IDijkstra <TCell, TMid> dijkstra, TCell start, Func <TCell, bool> valid)
 {
     return(dijkstra.Build().ComputeWhere(start, valid));
 }
예제 #5
0
 public static Dictionary <TCell, int> Dijkstra <TCell, TMid>(this IDijkstra <TCell, TMid> dijkstra, TCell start)
 {
     return(dijkstra.Build().Compute(start));
 }
예제 #6
0
 public static Dictionary <TCell, int> DijkstraAll <TCell, TMid>(this IDijkstra <TCell, TMid> dijkstra, TCell start, IEnumerable <TCell> all)
 {
     return(dijkstra.Build().ComputeAll(start, all));
 }
예제 #7
0
 public static Dijkstra <TCell, TMid> ToDijkstra <TCell, TMid>(this IDijkstra <TCell, TMid> dijkstra)
 {
     return(dijkstra.Build());
 }
 public FactorySupportDrawingModule(IDrawingModulePL drawingModulePL, IFrameWork frameWork)
 {
     this.drawingModulePL = drawingModulePL;
     this.frameWork       = frameWork;
     dijkstra             = new Dijkstra();
 }
예제 #9
0
파일: Suurballe.cs 프로젝트: mkr747/GIS
 public Suurballe(IDijkstra dijkstra)
 {
     _dijkstra = dijkstra;
 }