[][src]Module goko::layer

The Layers

This is the actual pair of hashmaps mentioned in tree, the evmap imported here is a modification of Jon Gjengset's. It should probably be modified more and pulled more into this library as this is the main bottleneck of the library.

Each layer consists of a pair of hash-maps where the values are nodes and the keys are the index of the center point of the node. This uniquely identifies each node on a layer and is a meaningful index pattern.

Writes to the tree are written to each layer and then each layer is refreshed. You should refrain from refreshing single layers and try to handle all write operations as a tree level function.

There is also an experimental pair of cluster hashmaps, which need to be replaced by a data structure that respects and represents the nerve more.

Structs

CoverLayerReader

Actual reader, primarily contains a read head to the hash-map. This also contains a reference to the scale_index so that it is easy to save and load. It is largely redundant, but helps with unit tests.

CoverLayerWriter

Primarily contains the node writer head, but also has the cluster writer head and the index head.