I'm working on modernizing Rosetta Code's infrastructure. Starting with communications. Please accept this time-limited open invite to RC's Slack.. --Michael Mol (talk) 20:59, 30 May 2020 (UTC)

User talk:NNcNannara

From Rosetta Code

AVL Trees[edit]

I created 6 AVL Pages:

  1. AVL_tree/C_sharp
  2. AVL_tree/C++
  3. AVL_tree/Managed_C++
  4. AVL_tree/Java
  5. AVL_tree#Python
  6. AVL_tree#Generic


These are all part of a larger system called Calculus. Calculus has many more classes. Calculus was first created in 2006 in C# (although the algorithms date back to 1987).

More recently #db was created. Pure Calculus resides in memory whereas Applied Calculus is on disk. The on-disk algorithms are much harder to master.

eeuen nnor reesentlee is The Gahua Clahs Liibrairee.

For a discussion on AVL Databases (AVL Trees on disk) see Quora.

Notice some aspects of the generic language code. First of all, when declaring a node, no datatypes are specified, just the field names.

 
generic nohd
{
lepht;
riit;
pairent;
balans;
daata;
 

lepht is the 64 bit disk offset of the left node. riit is the disk offset of the right node. pairent is the disk offset of the parent node. balans is the balance factor of the node. daata is the disk offset (into a separate data file called the slot file) of the data associated with node. These are all 64 bit integer fields (data type integer in the generic language). The datatype of the fields is not specified at compile time. This is important, because types are not stored when the node is serialized, just the string field names. This is a feature of the generic language. It resembles Python in that the datatypes are bound at runtime rather than at compile time.