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