Esempio n. 1
0
 public Kruskal(IConnectedComponentsCounter <TGraph, TVertex> connectedComponentsCounter, ICyclesDetector <TGraph, TVertex> cyclesDetector)
 {
     _connectedComponentsCounter = connectedComponentsCounter ?? throw new ArgumentNullException(nameof(connectedComponentsCounter));
     _cyclesDetector             = cyclesDetector ?? throw new ArgumentNullException(nameof(cyclesDetector));
 }
Esempio n. 2
0
 public TopologicalSorter(ICyclesDetector <TGraph, TVertex> cyclesDetector)
 {
     _cyclesDetector   = cyclesDetector ?? throw new ArgumentNullException(nameof(cyclesDetector));
     _verticesComparer = new GraphVertexEqualityComparer <TVertex>();
 }