public UnionFind(int vertices, IUnionFindAlgorithm algorithm) { if (algorithm == null) { throw new ArgumentNullException(); } _algorithm = algorithm; _count = vertices; _index = new int[vertices]; for (var i = 0; i < vertices; i++) { _index[i] = i; } }
public QuickFindStrategy(SquareModel[,] matrix) { _matrix = matrix; Algorithm = new QuickFind(matrix); }
public QuickFindStrategy(SquareModel[,] matrix) { _matrix = matrix; Algorithm = new QuickFind(matrix); }