-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Affects: io7m-com/.github#2
- Loading branch information
Showing
13 changed files
with
113 additions
and
529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
## jorchard | ||
|
||
A generic unbalanced [rose tree](https://en.wikipedia.org/wiki/Rose_tree) | ||
implementation. | ||
|
||
## Features | ||
|
||
* Generic, mutable rose trees. | ||
* High coverage test suite. | ||
* [OSGi-ready](https://www.osgi.org/) | ||
* [JPMS-ready](https://en.wikipedia.org/wiki/Java_Platform_Module_System) | ||
* ISC license. | ||
|
||
## Usage | ||
|
||
Assuming an arbitrary type `T`, create a tree with a root value of `x` of | ||
type `T`: | ||
|
||
``` | ||
var t = JOTreeNode.create(x); | ||
``` | ||
|
||
Add nodes to the tree: | ||
|
||
``` | ||
var t0 = JOTreeNode.create(y0); | ||
var t1 = JOTreeNode.create(y1); | ||
var t2 = JOTreeNode.create(y2); | ||
|
||
t0.setParent(t); | ||
t1.setParent(t); | ||
t2.setParent(t); | ||
``` | ||
|
||
Iterate over the tree: | ||
|
||
``` | ||
t.forEachDepthFirst(order, (input, depth, node) -> { | ||
// ... | ||
}); | ||
|
||
t.forEachBreadthFirst(order, (input, depth, node) -> { | ||
// ... | ||
}); | ||
``` | ||
|
||
Detach nodes from the tree: | ||
|
||
``` | ||
t2.detach(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
com.io7m.jorchard.documentation/src/main/assembly/documentation.xml
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
...m.jorchard.documentation/src/main/java/com/io7m/jorchard/documentation/Documentation.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
...7m.jorchard.documentation/src/main/java/com/io7m/jorchard/documentation/package-info.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.