Skip to content

Release 1.4.0 #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Added

## [1.4.0]
### Added
- Added build features: [#53](https://github.com/tzaeschke/phtree-cpp/issues/53)
- linting for C++ and bazel files.
- Added CI status badges.
Expand Down Expand Up @@ -160,7 +163,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Nothing.


[Unreleased]: https://github.com/improbable-eng/phtree-cpp/compare/v1.3.0...HEAD
[Unreleased]: https://github.com/improbable-eng/phtree-cpp/compare/v1.4.0...HEAD
[1.4.0]: https://github.com/improbable-eng/phtree-cpp/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/improbable-eng/phtree-cpp/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/improbable-eng/phtree-cpp/compare/v1.1.0...v1.2.0
[1.1.1]: https://github.com/improbable-eng/phtree-cpp/compare/v1.1.0...v1.1.1
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.14)

project(phtree VERSION 1.3.0
project(phtree VERSION 1.4.0
DESCRIPTION "PH-Tree C++"
HOMEPAGE_URL "https://github.com/tzaeschke/phtree-cpp"
LANGUAGES CXX)
Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct Counter {
size_t n_ = 0;
};

// Count entries inside of an axis aligned box defined by the two points (1,1,1) and (3,3,3)
// Count entries inside an axis aligned box defined by the two points (1,1,1) and (3,3,3)
Counter callback;
tree.for_each({{1, 1, 1}, {3, 3, 3}}, callback);
// callback.n_ is now the number of entries in the box.
Expand Down Expand Up @@ -200,7 +200,7 @@ struct FilterByValueId {
}
};

// Iterate over all entries inside of an axis aligned box defined by the two points (1,1,1) and (3,3,3).
// Iterate over all entries inside an axis aligned box defined by the two points (1,1,1) and (3,3,3).
// Return only entries that suffice the filter condition.
for (auto it = tree.begin_query({1, 1, 1}, {3, 3, 3}, FilterByValueId<3, T>())); it != tree.end(); ++it) {
...
Expand All @@ -227,7 +227,7 @@ template <dimension_t DIM, typename T>
struct FilterMultiMapByValueId {
template <typename BucketT>
[[nodiscard]] constexpr bool IsEntryValid(const PhPoint<DIM>& key, const BucketT& bucket) const {
// Arbitrary example: Only allow keys/buckets with a certain property, eg. keys that lie within a given sphere.
// Arbitrary example: Only allow keys/buckets with a certain property, e.g. keys that lie within a given sphere.
return check_some_geometric_propert_of_key(key);
}
[[nodiscard]] constexpr bool IsBucketEntryValid(const PhPoint<DIM>& key, const T& value) const {
Expand Down Expand Up @@ -436,7 +436,7 @@ heavily on the actual dataset, usage patterns, hardware, ... .
**Generally, the PH-Tree tends to have the following advantages:**

* Fast insertion/removal times. While some indexes, such as *k*-D-trees, trees can be build from scratch very fast, they
tend to be be much slower when removing entries or when indexing large datasets. Also, most indexes require
tend to be much slower when removing entries or when indexing large datasets. Also, most indexes require
rebalancing which may result in unpredictable latency (R-trees) or may result in index degradation if delayed
(*k*D-trees).

Expand Down Expand Up @@ -555,7 +555,6 @@ The PH-tree makes use of vectorization, so suggested compilation options for cla
<a id="bazel"></a>

### Bazel
<!--
`WORKSPACE` file:
```
http_archive(
Expand All @@ -573,7 +572,6 @@ cc_binary(
],
)
```
-->

Once you have set up your dependencies, you should be able to build the PH-Tree repository by running:
```
Expand All @@ -593,19 +591,17 @@ bazel run //benchmark:update_mm_d_benchmark --config=benchmark -- --benchmark_c

<a id="cmake"></a>

### cmake
<!--
### cmake dependency
The library supports three types of cmake dependency management, `FetchContent`, `find_package()` and `add_subfolder()`.
All three approaches are used in [this example project](https://github.com/tzaeschke/test-phtree-cpp-cmake).
#### FetchContent
With `FetchContent_...()`: ***NOTE This will only work once v1.4.0 has been released!***
With `FetchContent_...()`:
```
include(FetchContent)
FetchContent_Declare(
phtree
GIT_REPOSITORY https://github.com/tzaeschke/phtree-cpp.git
#GIT_TAG v1.3.0
GIT_TAG 9e81dd52560b346895379586d03ff4c51508d9d4
GIT_TAG v1.4.0
)
FetchContent_MakeAvailable(phtree)
```
Expand All @@ -628,8 +624,9 @@ target_link_libraries(ExampleProject phtree::phtree)
#### add_subfolder()
For this you can simply copy the PH-Tree source code into your project (you can skip `benchmark` and `test`) and
then include the folder with `add_subdirectory(phtree-cpp)`.
-->


### cmake build
`cmake` uses `ccache` when available.
```
mkdir build
Expand Down