Skip to content

Commit 87372fc

Browse files
committed
updated README
1 parent 3c20f7c commit 87372fc

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This repo is designed to have all common trees used in an easy to use php way
66

7-
Current included are implementations of a Binary Search Tree and a Rope, with more to come!
7+
Current included are implementations of a Binary Search Tree, Rope and a Generic Tree, with more to come!
88

99
All tests are written in PHP Unit, and all code is written in the PSR-4 standards. Php Trees also requires PHP 7.2 or above
1010

@@ -34,6 +34,14 @@ use PhpTrees\Rope;
3434
$r = new PhpTrees\Rope("This is a Rope!");
3535
```
3636

37+
To use the Generic Tree
38+
39+
```php
40+
use PhpTrees\GenericTree;
41+
42+
$g = new PhpTrees\GenericTree(4.1);
43+
```
44+
3745
This will create a binary search tree with a root of the value 5\
3846
For a more detailed description of the features of PHP Trees, check out the wiki\
3947
<https://github.com/CrimsonNynja/PHP-Trees/wiki>
@@ -44,5 +52,4 @@ tree balancing options\
4452
2-3 tree\
4553
Heep\
4654
B-Tree\
47-
Generic Tree\
4855
search/traversal types (depth first search breadth first search, etc)

src/PhpTrees/GenericTree.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public function findNodeByValue($value, ?GenericNode $node = null) : ?GenericNod
8686
$result = $this->findNode($id, $child);
8787
}
8888
}
89-
return $r
89+
return $result;
90+
}
9091
}
9192
}

0 commit comments

Comments
 (0)