Permalink
Browse files

Fixed NPE in getStats()

  • Loading branch information...
tzaeschke committed Dec 10, 2018
1 parent 3040c45 commit 17d52b17dda75e97332ca996cfae246538121133
@@ -1,4 +1,36 @@

2018-12-04
==========
Release 2.0.2
- (TZ) Fixed NullPointerException in getStats()


2018-05-30
==========
Release 2.0.1
This release contains some minor fixes and documentation updates.


2018-05-29
==========
Release 2.0.0
There are three new versions of the PH-tree:

- v13 has a new much better kNN query then previous versions, but has otherwise only small improvements over
the previous v11. v13 is the best version for less than 8 dimensions.
- v16 and v16HD are reimplementations of the PH-Tree. The basic concept is still the same, except that the internal
structure of nodes is now a B+Tree instead of the previous AHC/LHC nodes. Advantages:
* Much simpler code.
* Insertion/removal performance scales much better with dimensionality.
* The v16HD version supports theoretically up to 2^31 dimensions.
* Downside: memory requirements have increased, they are now on par with R*Trees or kD-trees.
* Internal B+Tree structure (with configurable page sizes) makes it more suitable for disk based storage.
* **API Contract Change**: The PH-Tree now stores keys (long[]/double[]) internally. Modifying them
after storing them in the tree will make the tree invalid.
- The `PhTree` factory class will automatically choose one of v13, v16 and v16HD, depending on the number of dimensions.



2017-09-17
==========
- (TZ) Fixed bug PhTreeF kNN: distance was not returned.
@@ -21,7 +21,7 @@ Maven:
<dependency>
<groupId>ch.ethz.globis.phtree</groupId>
<artifactId>phtree</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</dependency>
```

@@ -32,6 +32,10 @@ A C++ version of the PH-Tree (with slightly different design) is available [here

# News

### 2018-12-04

Released version 2.0.2 of the PH-Tree. This release contains a minor fix and documentation updates.

### 2018-05-30

Released version 2.0.1 of the PH-Tree. This release contains some minor fixes and documentation updates.
@@ -803,7 +803,7 @@ public void getStats(BSTStats stats) {
stats.nNodesLeaf++;
stats.nEntriesLeaf += nEntries;
stats.capacityLeaf += keys.length;
if (nEntries < 1 && parent.parent != null) {
if (nEntries < 1 && parent != null && parent.parent != null) {
throw new IllegalStateException();
}
} else {
@@ -774,7 +774,7 @@ public void getStats(BSTStats stats) {
stats.nNodesLeaf++;
stats.nEntriesLeaf += nEntries;
stats.capacityLeaf += keys.length;
if (nEntries < 1 && parent.parent != null) {
if (nEntries < 1 && parent != null && parent.parent != null) {
throw new IllegalStateException();
}
} else {

0 comments on commit 17d52b1

Please sign in to comment.