- Defined in:
Jumoku provides you with several modules and classes to build and manipulate tree-graphs.
A tree is a structure composed of branches binding nodes. Branches may be directed (arcs) or undirected (edges). When a there is only one general direction (flow), there is a root node, and one or several leaf nodes. A directed, uni-flow tree where each node only branches in once and branches out once is called a path. For more information on what a tree-graph is and how you could make use of it, see the README.
Two basic implementations are available: undirected trees () and directed trees ( ). They offer limited features, so one will certainly drop to their civilized siblings:
- is derived from an undirected tree and sticks to the mathematical tree definition.
- is derived from a directed tree and is likely to be used as the basis to modelize hierarchy structures, such as a family tree, a file browser???
A node can be any Object: there is no "node type". A nice object "type" to use as a node may be an OpenStruct or an OpenHash (from the Facets library), but really any object is valid.
Jumoku allows you to enable some strategies when creating a new tree. For instance, you may enable an edge/arc labeling strategy, which will cause indexing of branches as they are added. Jumoku provides a few basic strategies mixin, and one may implement custom ones.
Defined Under Namespace
Modules:, , , , , , , Classes: , , , , , , , , , , ,
- MAJOR =
- MINOR =
- PATCH =
- VERSION =
[MAJOR, MINOR, PATCH].join('.')
Instance Method Summary (collapse)
Instance Method Details
- (Object) ruby_18
3 4 5
# File 'lib/jumoku/support/ruby_compatibility.rb', line 3 def ruby_18 false end
- (Object) ruby_19
7 8 9
# File 'lib/jumoku/support/ruby_compatibility.rb', line 7 def ruby_19 yield end