?? partitionasforestv3.cs
字號:
namespace Opus6
{
using System;
[Copyright("Copyright (c) 2001 by Bruno R. Preiss, P.Eng."), Version("$Id: PartitionAsForestV3.cs,v 1.3 2001/09/11 12:04:04 brpreiss Exp $")]
public class PartitionAsForestV3 : PartitionAsForestV2
{
public PartitionAsForestV3(int n) : base(n)
{
}
public override void Join(Set s, Set t)
{
PartitionAsForest.PartitionTree tree1 = (PartitionAsForest.PartitionTree) s;
PartitionAsForest.PartitionTree tree2 = (PartitionAsForest.PartitionTree) t;
this.CheckArguments(tree1, tree2);
if (tree1.rank > tree2.rank)
{
tree2.parent = tree1;
}
else
{
tree1.parent = tree2;
if (tree1.rank == tree2.rank)
{
tree2.rank++;
}
}
base.count--;
}
public static void Main()
{
PartitionAsForest.TestPartition(new PartitionAsForestV3(5));
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -