Skip to content

Commit eb6d001

Browse files
typos in README.md (#22)
1 parent 9a4a57c commit eb6d001

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1515
- gcc/clang warnings
1616
- MSVC warnings
1717
- reserved identifier warnings (identifiers starting with `_`)
18+
- typos in README.md
1819

1920
## [1.0.1] - 2021-05-06
2021
### Changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# PH-Tree C++
22

33
The PH-Tree is an ordered index on an n-dimensional space (quad-/oct-/2^n-tree) where each
4-
dimension is (by default) indexed by a 64 bit integer. The index order follows z-order / Morton
4+
dimension is (by default) indexed by a 64bit integer. The index order follows z-order / Morton
55
order. The default implementation is effectively a 'map', i.e. each key is associated with at most one value.
66
Keys are points or boxes in n-dimensional space.
77

88

99

10-
One strength of PH-Trees are fast insert/removal operations and scalability with large datasets.
11-
It also provides fast window queries and _k_-nearest neighbor queries, and it scales well with higher dimenions.
10+
Two strengths of PH-Trees are fast insert/removal operations and scalability with large datasets.
11+
It also provides fast window queries and _k_-nearest neighbor queries, and it scales well with higher dimensions.
1212
The default implementation is limited to 63 dimensions.
1313

1414
The API ist mostly analogous to STL's `std::map`, see function descriptions for details.
@@ -132,6 +132,7 @@ tree.estimate_count(query);
132132
* For-each with box shaped window queries: `tree.fore_each(PhBoxD(min, max), callback);`
133133
* Iterator for box shaped window queries: `auto q = tree.begin_query(PhBoxD(min, max));`
134134
* Iterator for _k_ nearest neighbor queries: `auto q = tree.begin_knn_query(k, center_point, distance_function);`
135+
* Custom query shapes, such as spheres: `tree.for_each(callback, FilterSphere(center, radius, tree.converter()));`
135136
136137
<a name="for-each-example" />
137138
@@ -174,7 +175,7 @@ for (auto it = tree.begin_knn_query(5, {1, 1, 1}); it != tree.end(); ++it) {
174175
<a name="Filters" />
175176

176177
##### Filters
177-
All queries allow specifying an additional filter. The filter is called for every key/value pair that the would
178+
All queries allow specifying an additional filter. The filter is called for every key/value pair that would
178179
normally be returned (subject to query constraints) and to every node in the tree that the query decides to
179180
traverse (also subject to query constraints). Returning `true` in the filter does not change query behaviour,
180181
returning `false` means that the current value or child node is not returned or traversed.
@@ -221,7 +222,7 @@ for (auto it = tree.begin_knn_query(5, {1, 1, 1}, DistanceL1<3>())); it != tree.
221222
#### Converters
222223
The PH-Tree can internally only process integer keys. In order to use floating point coordinates, the floating point
223224
coordinates must be converted to integer coordinates. The `PhTreeD` and `PhTreeBoxD` use by default the
224-
`PreprocessIEEE` & `PostProcessIEEE` functions. The `IEEE` processor is a loss-less converter (in term of numeric
225+
`PreprocessIEEE` & `PostProcessIEEE` functions. The `IEEE` processor is a loss-less converter (in terms of numeric
225226
precision) that simply takes the 64bits of a double value and treats them as if they were a 64bit integer
226227
(it is slightly more complicated than that, see discussion in the papers referenced above).
227228
In other words, it treats the IEEE 754 representation of the double value as integer, hence the name `IEEE` converter.
@@ -441,15 +442,15 @@ There are numerous ways to improve performance. The following list gives an over
441442
* Using pointers is also useful if construction/destruction of values is expensive. The reason is that
442443
the tree has to construct and destruct objects internally. This may be avoidable but is currently still happening.
443444

444-
4) **Use non-box query shapes**. Depending on the use case it may be more suitable to use a custom filter for querier.
445+
4) **Use non-box query shapes**. Depending on the use case it may be more suitable to use a custom filter for queries.
445446
For example:
446447

447448
`tree.for_each(callback, FilterSphere(center, radius, tree.converter()));`
448449

449450
5) **Use a different data converter**. The default converter of the PH-Tree results in a reasonably fast index.
450451
Its biggest advantage is that it provides lossless conversion from floating point coordinates to PH-Tree coordinates
451452
(integers) and back to floating point coordinates.
452-
* The `ConverterMultiply` is a lossy converter but it tends to give 10% or more better performance. This is not caused
453+
* The `ConverterMultiply` is a lossy converter but it tends to improve performance by 10% or more. This is not caused
453454
by faster operation in the converter itself but by a more compact tree shape. The example shows how to use a converter
454455
that multiplies coordinates by 100'000, thus preserving roughly 5 fractional digits:
455456

@@ -460,8 +461,8 @@ Its biggest advantage is that it provides lossless conversion from floating poin
460461
can often be adapted to be accepted directly by the PH-Tree without conversion. This requires implementing a
461462
custom converter as described in the section about [Custom Key Types](#custom-key-types).
462463

463-
7) Advanced: **Adapt internal Node represenation**. Depending on the dimensionality `DIM`, the PH-Tree uses internally in
464-
`Nodes` different container types to hold entries. By default it uses an array for `DIM<=3`, a vector
464+
7) Advanced: **Adapt internal Node representation**. Depending on the dimensionality `DIM`, the PH-Tree uses internally in
465+
`Nodes` different container types to hold entries. By default, it uses an array for `DIM<=3`, a vector
465466
for `DIM<=8` and an ordered map for `DIM>8`. Adapting these thresholds can have strong effects on performance as well as
466467
memory usage.
467468
One example: Changing the threshold to use vector for `DIM==3` reduced performance of the `update_d` benchmark by 40%-50% but
@@ -484,7 +485,7 @@ This section will guide you through the initial build system and IDE you need to
484485

485486
### Build system & dependencies
486487

487-
PH-Tree can be built with *cmake 3.14* or [Bazel](https://bazel.build) as build system. All of the code is written in C++ targeting the C++17 standard.
488+
PH-Tree can be built with *cmake 3.14* or [Bazel](https://bazel.build) as build system. All code is written in C++ targeting the C++17 standard.
488489
The code has been verified to compile with Clang 9 on Linux and Visual Studio 2019 on Windows.
489490

490491
#### Ubuntu Linux
@@ -545,7 +546,7 @@ cmake --build .
545546

546547
### Theory
547548

548-
The PH-Tree is discussed in the follwoing publications and reports:
549+
The PH-Tree is discussed in the following publications and reports:
549550

550551
- T. Zaeschke, C. Zimmerli, M.C. Norrie:
551552
"The PH-Tree -- A Space-Efficient Storage Structure and Multi-Dimensional Index", (SIGMOD 2014)

0 commit comments

Comments
 (0)