BagTree - Description


The generic class BagTree has two type parameters, K - the key type, and T - the data type. BagTrees are different from single key bag trees in that they allow duplicate keys. The generic class BagTree exists in the namespace Calculus (in assembly Calculus.dll).

When creating a bag tree BagTree<K,T>, both the key class K and the data class T are expected to be comparable. These classes may derive from the appropriate IComparable interface or comparers may be specified on a constructor.

The declaration of the bag tree class (in C#) is shown below.

[Serializable]
public class BagTree<K, T> : Bag<T>
{
 ...
}

BagTrees derive from Bags.

For a bag tree each T has an embedded key. Separate keyed searches (on K) are supported.