⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 partitionasforestv3.cs

📁 Data Structures and Algorithms with Object-Oriented Design Patterns in C# 这本书的范例代码dll自己反编译的source
💻 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));
        }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -