Ejemplo n.º 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();
        }
Ejemplo n.º 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));
Ejemplo n.º 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));
 }
Ejemplo n.º 5
0
 public static Dictionary <TCell, int> Dijkstra <TCell, TMid>(this IDijkstra <TCell, TMid> dijkstra, TCell start)
 {
     return(dijkstra.Build().Compute(start));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 9
0
 public Suurballe(IDijkstra dijkstra)
 {
     _dijkstra = dijkstra;
 }