Liking cljdoc? Tell your friends :D

eva.v2.datastructures.bbtree.logic.v0.nodes


add-childclj

(add-child node child)
(add-child node child buffer-aware?)

Adds a child to an internal node. Meant to be used when creating a node or when 'swapping' children. You should always add children in reverse sorted order. The flag 'buffer-aware?' indicates whether to take the message buffers into account when assigning local cap keys for the child.

Adds a child to an internal node. Meant to be used when creating a node or when 'swapping' children.
You should always add children in reverse sorted order.
The flag 'buffer-aware?' indicates whether to take the message buffers into account when
assigning local cap keys for the child.
sourceraw docstring

add-child-buffer-unawareclj

(add-child-buffer-unaware node child)
source

add-childrenclj

(add-children node adopted->msgs)

Takes a node and a map nodes->msgs to add. Ensures min- and max-rec are up-to-date.

Takes a node and a map nodes->msgs to add. Ensures min- and max-rec are up-to-date.
sourceraw docstring

add-messagesclj

(add-messages node msgs)

Adds many messages to a node's message buffer. Updates min- and max-rec accordingly.

Adds many messages to a node's message buffer. Updates min- and max-rec accordingly.
sourceraw docstring

add-ranged-messageclj

(add-ranged-message node msg)

Adds a ranged message to all appropriate message buffers in the node. No updates are made to min- or max-rec.

Adds a ranged message to all appropriate message buffers in the node. No updates
are made to min- or max-rec.
sourceraw docstring

add-simple-messageclj

(add-simple-message node msg)

Add a single message to a node's message buffer. Updates min- and max-rec accordingly.

Add a single message to a node's message buffer. Updates min- and max-rec accordingly.
sourceraw docstring

apply-messagesclj

(apply-messages node msgs)

Applies message operations. Valid ops and their implementations are defined in the message namespace.

Applies message operations. Valid ops and their implementations are defined in
the message namespace.
sourceraw docstring

buffer-overflowing?clj

(buffer-overflowing? node)
source

empty-propertiesclj

(empty-properties props)

Selects from properties the keys #{:comparator :order :leaf? :buffer-size} then merges {:root? false} and returns the result.

Selects from properties the keys #{:comparator :order :leaf? :buffer-size}
then merges {:root? false} and returns the result.
sourceraw docstring

ensure-pointerclj

(ensure-pointer pointer-thing)

Takes either a pointer or a node id. Returns either that pointer or a minimal implementation of Pointer and Node that will give its uuid.

Takes either a pointer or a node id. Returns either that pointer or a minimal implementation
of Pointer and Node that will give its uuid.
sourceraw docstring

ensure-uuidclj

(ensure-uuid maybe-uuid id tx)

Expects, but does not enforce, that maybe-uuid is either nil or a string of (format "%s-%s-%s" id tx (UUID/randomUUID)). If maybe-uuid is nil, this returns a new string of that format.

Expects, but does not enforce, that maybe-uuid is either
nil or a string of (format "%s-%s-%s" id tx (UUID/randomUUID)).
If maybe-uuid is nil, this returns a new string of that format.
sourceraw docstring

left-most-key?clj

(left-most-key? node k)
source

make-child->msgsclj

(make-child->msgs node messages)
source

min-node-sizeclj

(min-node-size node)

Minimum size the node can be before considered 'too small'.

Minimum size the node can be before considered 'too small'.
sourceraw docstring

min-rec-buffer-awareclj

(min-rec-buffer-aware node k child)

Finds the min-rec of the child, taking into account messages currently sitting in the buffer to be delivered to that child.

Finds the min-rec of the child, taking into account messages currently sitting
in the buffer to be delivered to that child.
sourceraw docstring

new-node-idclj

(new-node-id)

Nodes within a tree are identified uniquely by a combination of id and version. Whenever a brand-new node is added to the tree, a new node id is generated sequentially. That's what this method does.

Nodes within a tree are identified uniquely by a combination of id and version.
Whenever a brand-new node is added to the tree, a new node id is generated sequentially.
That's what this method does.
sourceraw docstring

node->pointerclj

(node->pointer node)
source

node-minrec-aboveclj

(node-minrec-above this k)
(node-minrec-above this k buffer-aware?)

Takes an internal node and a dictionary key. Returns the min-rec of the next node 'above' that key. Useful for establishing cap keys or sorting messages.

Takes an internal node and a dictionary key. Returns the min-rec of the next node
'above' that key. Useful for establishing cap keys or sorting messages.
sourceraw docstring

node-minrec-above-buffer-unawareclj

(node-minrec-above-buffer-unaware this k)
source

node-overlaps?clj

(node-overlaps? node range)
(node-overlaps? cmp node [y1 y2])

Does this node overlap with this range? Optionally accepts comparator.

Does this node overlap with this range? Optionally accepts comparator.
sourceraw docstring

node-valid-size?clj

(node-valid-size? node)
source

nodes->pointersclj

(nodes->pointers nodes)
source

overflowed?clj

(overflowed? node)
source

pointer->nodeclj

(pointer->node pointer)
source

pointers->nodesclj

(pointers->nodes pointers)
source

remove-childrenclj

(remove-children node ks)

Takes an inner node and a simple sequence of keys. Removes children bound to those keys, along with any messages intended for those children. Updates min- and max-rec accordingly.

Takes an inner node and a simple sequence of keys. Removes children bound to
those keys, along with any messages intended for those children. Updates
min- and max-rec accordingly.
sourceraw docstring

remove-valuesclj

(remove-values node ks)

Takes a leaf node and a simple sequence of keys. Removes the values stored by those keys. Once it is finished, it updates the min-rec and max-rec properties of the node.

Takes a leaf node and a simple sequence of keys. Removes the values stored by those keys.
Once it is finished, it updates the min-rec and max-rec properties of the node.
sourceraw docstring

reset-messagesclj

(reset-messages node)

Removes all of the messages from the node's buffer and re-adds them. To be used when the node's internal cap keys have been altered to keep the message buffers in sync.

Removes all of the messages from the node's buffer and re-adds them.
To be used when the node's internal cap keys have been altered to keep
the message buffers in sync.
sourceraw docstring

right-most-key?clj

(right-most-key? node k)
source

transfer-messagesclj

(transfer-messages node ks->msgs)

Adds messages to the buffer of a node when you already know which keys the messages should correspond to. Does nothing to the node's min-rec or max-rec values.

Adds messages to the buffer of a node when you already know which keys the messages
should correspond to. Does nothing to the node's min-rec or max-rec values.
sourceraw docstring

underflowed?clj

(underflowed? node)
source

update-min-maxclj

(update-min-max node)
source

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

× close