12,297,876 members (52,625 online)

99.3K views
89 bookmarked
Posted

# Persistent Data Structures

, 23 Feb 2005 MIT
An article describing the basic principles of persistent data structures.
 ImmutableCollections ImmutableCollections AVL Tree Classes ImmutableCollections.csproj.user RAL Helper Classes ```/* * Created by: Leslie Sanford * * Last modified: 02/23/2005 * * Contact: jabberdabber@hotmail.com */ using System; namespace ImmutableCollections { /// /// Represents a null AVL node. /// internal class NullAvlNode : IAvlNode { #region IAvlNode Members /// /// Removes the current node from the AVL tree. /// /// /// The node to in the tree to replace the current node. /// public IAvlNode Remove() { return this; } /// /// Balances the subtree represented by the node. /// /// /// The root node of the balanced subtree. /// public IAvlNode Balance() { return this; } /// /// Indicates whether or not the subtree the node represents is in /// balance. /// /// /// true if the subtree is in balance; otherwise, false. /// public bool IsBalanced() { return true; } /// /// Gets the balance factor of the subtree the node represents. /// public int BalanceFactor { get { return 0; } } /// /// Gets the number of nodes in the subtree. /// public int Count { get { return 0; } } /// /// Gets the node's data. /// public object Data { get { return null; } } /// /// Gets the height of the subtree the node represents. /// public int Height { get { return 0; } } /// /// Gets the node's left child. /// public IAvlNode LeftChild { get { return this; } } /// /// Gets the node's right child. /// public IAvlNode RightChild { get { return this; } } #endregion } } ```

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

## Share

 United States
Aside from dabbling in BASIC on his old Atari 1040ST years ago, Leslie's programming experience didn't really begin until he discovered the Internet in the late 90s. There he found a treasure trove of information about two of his favorite interests: MIDI and sound synthesis.

After spending a good deal of time calculating formulas he found on the Internet for creating new sounds by hand, he decided that an easier way would be to program the computer to do the work for him. This led him to learn C. He discovered that beyond using programming as a tool for synthesizing sound, he loved programming in and of itself.

Eventually he taught himself C++ and C#, and along the way he immersed himself in the ideas of object oriented programming. Like many of us, he gotten bitten by the design patterns bug and a copy of GOF is never far from his hands.

Now his primary interest is in creating a complete MIDI toolkit using the C# language. He hopes to create something that will become an indispensable tool for those wanting to write MIDI applications for the .NET framework.

Besides programming, his other interests are photography and playing his Les Paul guitars.