Liking cljdoc? Tell your friends :D

nested-sets.core


adjacency-list->vec-treeclj/s

(adjacency-list->vec-tree id-key parent-id-key nodes)

Inputs: [id-key :- s/Keyword parent-id-key :- s/Keyword nodes]

Make a vector that represents a tree which enable to be a zipper using vector-zip nodes must represent adjacency list

Inputs: [id-key :- s/Keyword parent-id-key :- s/Keyword nodes]

Make a vector that represents a tree which enable to be a zipper using vector-zip
nodes must represent adjacency list
sourceraw docstring

ancestor?clj/s

(ancestor? n1 n2)

Inputs: [n1 :- Node n2 :- Node]

true if n1 is a ancestor of n2

Inputs: [n1 :- Node n2 :- Node]

true if n1 is a ancestor of n2
sourceraw docstring

descendant?clj/s

(descendant? n1 n2)

Inputs: [n1 :- Node n2 :- Node]

true if n1 is a descendant of n2

Inputs: [n1 :- Node n2 :- Node]

true if n1 is a descendant of n2
sourceraw docstring

leaf?clj/s

(leaf? {:keys [lft rgt]})

Inputs: [{:keys [lft rgt]} :- Node]

true if the node is a leaf node

Inputs: [{:keys [lft rgt]} :- Node]

true if the node is a leaf node
sourceraw docstring

nested-sets->vec-treeclj/s

(nested-sets->vec-tree nodes)

Inputs: [nodes :- [Node]]

Make a vector that represents a tree which enable to be a zipper using vector-zip nodes must represent nested sets

Inputs: [nodes :- [Node]]

Make a vector that represents a tree which enable to be a zipper using vector-zip
nodes must represent nested sets
sourceraw docstring

root?clj/s

(root? {:keys [lft]})

Inputs: [{:keys [lft]} :- Node]

true if the node is the root node

Inputs: [{:keys [lft]} :- Node]

true if the node is the root node
sourceraw docstring

sort-nested-setsclj/s

(sort-nested-sets nodes)

Inputs: [nodes :- [Node]]

sort as nested sets model

Inputs: [nodes :- [Node]]

sort as nested sets model
sourceraw docstring

vec-tree->nested-setsclj/s

(vec-tree->nested-sets vec-tree)

Inputs: [vec-tree] Returns: (s/maybe [Node])

Make a nested sets as a vector from a vector tree which may be made from nested-sets->vec-tree above

Inputs: [vec-tree]
Returns: (s/maybe [Node])

Make a nested sets as a vector from a vector tree
which may be made from nested-sets->vec-tree above
sourceraw docstring

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

× close