C# Class WeightedQuickUnionByHeightUf, Algorithms-4th-Edition-in-Csharp

按照高度加权的 Quick-Union 并查集。
Inheritance: QuickUnionUf
ファイルを表示 Open project: ikesnowy/Algorithms-4th-Edition-in-Csharp

Public Methods

Method Description
Union ( int p, int q ) : void

将两个结点所属的连通分量合并。

WeightedQuickUnionByHeightUf ( int n )

新建一个以高度作为判断依据的加权 quick-union 并查集。

Method Details

Union() public method

将两个结点所属的连通分量合并。
public Union ( int p, int q ) : void
p int 需要合并的结点。
q int 需要合并的另一个结点。
return void

WeightedQuickUnionByHeightUf() public method

新建一个以高度作为判断依据的加权 quick-union 并查集。
public WeightedQuickUnionByHeightUf ( int n )
n int 新建并查集的大小。