balanced

package
v0.4.16-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package balanced provides methods to build balanced DAGs. In a balanced DAG, nodes are added to a single root until the maximum number of links is reached (with leaves being at depth 0). Then, a new root is created, and points to the old root, and incorporates a new child, which proceeds to be filled up (link) to more leaves. In all cases, the Data (chunks) is stored only at the leaves, with the rest of nodes only storing links to their children.

In a balanced DAG, nodes fill their link capacity before creating new ones, thus depth only increases when the current tree is completely full.

Balanced DAGs are generalistic DAGs in which all leaves are at the same distance from the root.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Layout added in v0.4.14

func Layout(db *h.DagBuilderHelper) (ipld.Node, error)

Layout builds a balanced DAG. Data is stored at the leaves and depth only increases when the tree is full, that is, when the root node has reached the maximum number of links.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL