public ShortestPathAlgorithms(Func <TEdge, double> edgeWeights) { if (edgeWeights == null) { throw new Exception("Delegate for extracting edge weights must be supplied."); } EdgeWeights = edgeWeights; vertexColors = new Dictionary <TVertex, VertexColor>(); minQueue = new PQMin <TVertex>(VertexWeightComparer); distances = new Dictionary <TVertex, double>(); }
public EventSimulator() { EventGraph = new Digraph <TEvent, EventEdge <TEvent> >(); FEL = new PQMin <EventPar <TEvent> >(); Time = 0.0; }
public EntityPQueue(string description, int capacity = int.MaxValue) : base(description) { Capacity = capacity; //Bitno je primetiti da je osnovno poredjenje zamenjeno virtuelnom metodom za poredjenje. queue = new PQMin <Entity>((x, y) => x.CompareTo(y)); }