BalancedSearchTree.NodeStore: type of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend as BalancedSearchTree Lines 13-23 of bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/balanced_search_tree.bend&start_line=13&end_line=23 import Base # Node storage: one array per node field instead of one array of Node # records. Reading a record out of an array hands back a shared copy that the # runtime reference-counts and takes apart field by field; a field read out of # its own array is a plain word. The store has the shape of a dynamic array # of nodes: slots [0, used) are live, the capacity is 2^depth <= 2^limit, and # it grows by doubling. A slot holds the encoding of its node by ntag (0 free, # 1 black, 2 red), nleft (the free-list link of a free slot), nright, nparent # and nkey (None when free); every other slot holds the encoding of Free{0}, # so each array is exactly its field of the node list, padded. type NodeStore<-K: Data> is Type: NS{limit: Nat, depth: Nat, cap: Nat, used: Nat, tags: Array, lefts: Array, rights: Array, parents: Array, keys: Array>} Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat