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

absclj/s

(abs n)

Returns the absolute value of the number n

Returns the absolute value of the number n
sourceraw 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.
sourceraw docstring

balance-bitshiftclj/s

source

balance-maskclj/s

source

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
sourceraw 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.
sourceraw 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
sourceraw docstring

header-sizeclj/s

source

header-size-intclj/s

source

header-size-longclj/s

source

init-child!clj/s

(init-child! node side child)
source

leftclj/s

source

left-maskclj/s

source

left-offsetclj/s

Offset of the left child, in longs

Offset of the left child, in longs
sourceraw docstring

neighbor-nodeclj/s

(neighbor-node side tree node)
source

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

Creates an empty block tree
sourceraw docstring

new-nodeclj/s

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

Returns a new node object

Returns a new node object
sourceraw docstring

next-nodeclj/s

source

Nodeclj/s

source

node-cache-sizeclj/s

source

node-seqclj/s

(node-seq tree node)
source

nullclj/s

Indicate an invalid node ID

Indicate an invalid node ID
sourceraw docstring

otherclj/s

(other s)
source

prev-nodeclj/s

source

ReadOnlyTreeclj/s

source

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.
sourceraw docstring

source

right-offsetclj/s

Offset of the right child, in longs

Offset of the right child, in longs
sourceraw docstring

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)
source

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
source

TxTreeclj/s

source

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

× close