Liking cljdoc? Tell your friends :D

asami.durable.tree

This namespace provides the basic mechanisms for AVL trees

This namespace provides the basic mechanisms for AVL trees
raw docstring

add-to-rootclj/s

(add-to-root tree node deeper?)

Runs back up a branch to update and balance the branch for the transaction. node argument is a fully written branch of the tree. Returns the root of the tree.

Runs back up a branch to update and balance the branch for the transaction.
node argument is a fully written branch of the tree.
Returns the root of the tree.
raw docstring

balance-bitshiftclj/s


balance-maskclj/s


calc-block-sizeclj/s

(calc-block-size payload-size)

Determines the size of a block used by a tree, based on the payload in the node

Determines the size of a block used by a tree, based on the payload in the node
raw docstring

find-end-nodeclj/s

(find-end-node {:keys [root] :as tree} side)

Finds the first or the last node in the tree

Finds the first or the last node in the tree
raw docstring

find-node*clj/s

(find-node* {:keys [root node-comparator] :as tree} key)

Finds a node in the tree using a key. returns one of: null: an empty tree node: the data was found vector: the data was not there, and is found between 2 nodes. The leaf node is in the vector. The other (unneeded) node is represented by nil.

Finds a node in the tree using a key.
returns one of:
null: an empty tree
node: the data was found
vector: the data was not there, and is found between 2 nodes. The leaf node is in the vector.
The other (unneeded) node is represented by nil.
raw docstring

get-nodeclj/s

(get-node tree id)
(get-node {:keys [block-manager node-cache] :as tree} id parent)

Returns a node object for a given ID

Returns a node object for a given ID
raw docstring

header-sizeclj/s


header-size-intclj/s


header-size-longclj/s


init-child!clj/s

(init-child! node side child)

leftclj/s


left-maskclj/s


left-offsetclj/s

Offset of the left child, in longs

Offset of the left child, in longs
raw docstring

neighbor-nodeclj/s

(neighbor-node side tree node)

new-block-treeclj/s

(new-block-tree block-manager-factory store-name data-size node-comparator)
(new-block-tree block-manager-factory
                store-name
                data-size
                node-comparator
                root-id)

Creates an empty block tree. The factory may provide a block manager that this objects owns, or which is provided. This can be determined by calling the block-manager-factory with no arguments.

Creates an empty block tree.
The factory may provide a block manager that this objects owns, or which is provided.
This can be determined by calling the block-manager-factory with no arguments.
raw docstring

new-nodeclj/s

(new-node tree)
(new-node tree data writer)
(new-node {:keys [block-manager node-cache] :as tree} data parent writer)

Returns a new node object

Returns a new node object
raw docstring

next-nodeclj/s


Nodeclj/s


node-cache-sizeclj/s


node-seqclj/s

(node-seq tree node)

nullclj/s

Indicate an invalid node ID

Indicate an invalid node ID
raw docstring

otherclj/s

(other s)

prev-nodeclj/s


ReadOnlyTreeclj/s


rebalance!clj/s

(rebalance! tree node balance)

Rebalance an AVL node. The root of the rebalance is returned unwritten, but all subnodes are written.

Rebalance an AVL node. The root of the rebalance is returned unwritten, but all subnodes are written.
raw docstring


right-offsetclj/s

Offset of the right child, in longs

Offset of the right child, in longs
raw docstring

to-hexclj/s

(to-hex n)

Treeclj/sprotocol

addclj/s

(add this data writer)
(add this data writer location)

Adds data to the tree

Adds data to the tree

atclj/s

(at this new-root)

Returns a tree for a given transaction root

Returns a tree for a given transaction root

find-nodeclj/s

(find-node this key)

Finds a node in the tree using a key.

Finds a node in the tree using a key.

first-nodeclj/s

(first-node this)

Finds the first node in iteration order

Finds the first node in iteration order

last-nodeclj/s

(last-node this)

Finds the last node in iteration order

Finds the last node in iteration order

modify-node!clj/s

(modify-node! this node)

Makes a node available to modify in the current transaction. Returns the new tree and a node that can be modified (possible the same node)

Makes a node available to modify in the current transaction.
Returns the new tree and a node that can be modified (possible the same node)

TreeNodeclj/sprotocol

copy-on-writeclj/s

(copy-on-write this tree)

Return a node that is writable in the current transaction

Return a node that is writable in the current transaction

get-balanceclj/s

(get-balance this)

Retrieves the balance of the node

Retrieves the balance of the node

get-childclj/s

(get-child this tree side)

Gets the Node of the child on the given side

Gets the Node of the child on the given side

get-child-idclj/s

(get-child-id this side)

Gets the Node ID of the child on the given side

Gets the Node ID of the child on the given side

get-parentclj/s

(get-parent this)

Returns the parent node. Not the Node ID, but the node object.

Returns the parent node. Not the Node ID, but the node object.

set-balance!clj/s

(set-balance! this balance)

Sets the balance of the node

Sets the balance of the node

set-child!clj/s

(set-child! this side child)

Sets the ID of the child for the given side

Sets the ID of the child for the given side

writeclj/s

(write this tree)

Persists the node to storage

Persists the node to storage

TxTreeclj/s

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close