Module iodyn::raz [] [src]

Gauged Incremental Random Access Zipper

RAZ - random access sequence

  • cursor access in low-const O(1) time
  • arbitrary access in O(log n) time
  • combines tree cursor with stack

A Raz has two modes, one for editing(Raz), and one for computations over all the data(RazTree). A user calls focus on a RazTree to begin editing mode, then unfocus to return to compute mode.

Build the dataset by pushing items into the Raz, while occasionally running archive_left (or archive_right) to define subsequences. These subsequences are used by the incremental computation engine to boost performance. For simple computations over the RazTree, archives every 1000 or so elements work well. Consistency is not necessary, since insertions and deletions are expected. archive_left takes a level and a name. The level can be generated with the crate-level function inc_level. Names must be unique, and can be generated with adapton::engine::*'s name_of_usize(num), by passing a number from a counter.

Structs

Raz

Random access zipper

RazTree

Tree form of a RAZ