コード例 #1
0
ファイル: Kruskal.cs プロジェクト: pkirilin/Graph
 public Kruskal(IConnectedComponentsCounter <TGraph, TVertex> connectedComponentsCounter, ICyclesDetector <TGraph, TVertex> cyclesDetector)
 {
     _connectedComponentsCounter = connectedComponentsCounter ?? throw new ArgumentNullException(nameof(connectedComponentsCounter));
     _cyclesDetector             = cyclesDetector ?? throw new ArgumentNullException(nameof(cyclesDetector));
 }
コード例 #2
0
ファイル: TopologicalSorter.cs プロジェクト: pkirilin/Graph
 public TopologicalSorter(ICyclesDetector <TGraph, TVertex> cyclesDetector)
 {
     _cyclesDetector   = cyclesDetector ?? throw new ArgumentNullException(nameof(cyclesDetector));
     _verticesComparer = new GraphVertexEqualityComparer <TVertex>();
 }