internal void AssociateNodes(int firstId, int secondId)
 {
     if (firstId == secondId)
     {
         return;
     }
     KeyManager.Partition partition1 = this._identifiers[firstId].Partition;
     if (partition1 != null)
     {
         KeyManager.Partition partition2 = this._identifiers[secondId].Partition;
         if (partition2 != null)
         {
             partition1.Merge(this, partition2);
         }
         else
         {
             partition1.AddNode(this, secondId);
         }
     }
     else
     {
         KeyManager.Partition partition2 = this._identifiers[secondId].Partition;
         if (partition2 != null)
         {
             partition2.AddNode(this, firstId);
         }
         else
         {
             KeyManager.Partition.CreatePartition(this, firstId, secondId);
         }
     }
 }
 internal int GetCliqueIdentifier(int identifier)
 {
     KeyManager.Partition partition = this._identifiers[identifier].Partition;
     if (partition != null)
     {
         return(partition.PartitionId);
     }
     return(identifier);
 }
 internal void Merge(KeyManager manager, KeyManager.Partition other)
 {
     if (other.PartitionId == this.PartitionId)
     {
         return;
     }
     foreach (int nodeId in other._nodeIds)
     {
         this.AddNode(manager, nodeId);
     }
 }
 internal static void CreatePartition(KeyManager manager, int firstId, int secondId)
 {
     KeyManager.Partition partition = new KeyManager.Partition(firstId);
     partition.AddNode(manager, firstId);
     partition.AddNode(manager, secondId);
 }