Skip to content

Commit 4ce863b

Browse files
authored
initial (#117)
1 parent 4618230 commit 4ce863b

3 files changed

Lines changed: 36 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
- Added B+tree multimap for internal (future) use. [#93](https://github.com/tzaeschke/phtree-cpp/issues/93)
1111
- Added some fuzz tests. Not that these require manual compilation, see [fuzzer/README.md](fuzzer/README.md).
1212
[#114](https://github.com/tzaeschke/phtree-cpp/pull/114)
13+
- Added float-32 variants to multimap: PhTreeMultiMapF, PhTreeMultiMapBoxF.
14+
[#117](https://github.com/tzaeschke/phtree-cpp/pull/117)
1315

1416
### Changed
1517
- Clean up array_map. [#107](https://github.com/tzaeschke/phtree-cpp/issues/107),

include/phtree/phtree.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ class PhTree {
368368
CONVERTER converter_;
369369
};
370370

371-
/*
371+
/**
372372
* Floating-point `double` version of the PH-Tree.
373373
* This version of the tree accepts multi-dimensional keys with floating point (`double`)
374374
* coordinates.
@@ -383,23 +383,25 @@ class PhTree {
383383
template <dimension_t DIM, typename T, typename CONVERTER = ConverterIEEE<DIM>>
384384
using PhTreeD = PhTree<DIM, T, CONVERTER>;
385385

386-
/*
386+
/**
387387
* Floating-point `float` version of the PH-Tree.
388388
* This version of the tree accepts multi-dimensional keys with floating point (`float`)
389389
* coordinates.
390-
*
391390
* See 'PhTreeD' for details.
392391
*/
393392
template <dimension_t DIM, typename T, typename CONVERTER = ConverterFloatIEEE<DIM>>
394393
using PhTreeF = PhTree<DIM, T, CONVERTER>;
395394

395+
/**
396+
* A PH-Tree that uses (axis aligned) boxes as keys.
397+
* See 'PhTreeD' for details.
398+
*/
396399
template <dimension_t DIM, typename T, typename CONVERTER_BOX>
397400
using PhTreeBox = PhTree<DIM, T, CONVERTER_BOX>;
398401

399402
/**
400403
* A PH-Tree that uses (axis aligned) boxes as keys.
401404
* The boxes are defined with 64bit 'double' floating point coordinates.
402-
*
403405
* See 'PhTreeD' for details.
404406
*/
405407
template <dimension_t DIM, typename T, typename CONVERTER_BOX = ConverterBoxIEEE<DIM>>
@@ -408,7 +410,6 @@ using PhTreeBoxD = PhTreeBox<DIM, T, CONVERTER_BOX>;
408410
/**
409411
* A PH-Tree that uses (axis aligned) boxes as keys.
410412
* The boxes are defined with 32bit 'float' coordinates.
411-
*
412413
* See 'PhTreeD' for details.
413414
*/
414415
template <dimension_t DIM, typename T, typename CONVERTER_BOX = ConverterBoxFloatIEEE<DIM>>

include/phtree/phtree_multimap.h

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,6 @@ class PhTreeMultiMap {
823823
/**
824824
* A PH-Tree multi-map that uses (axis aligned) points as keys.
825825
* The points are defined with 64bit 'double' floating point coordinates.
826-
*
827826
* See 'PhTreeD' for details.
828827
*/
829828
template <
@@ -833,6 +832,22 @@ template <
833832
typename BUCKET = b_plus_tree_hash_set<T>>
834833
using PhTreeMultiMapD = PhTreeMultiMap<DIM, T, CONVERTER, BUCKET>;
835834

835+
/**
836+
* A PH-Tree multi-map that uses (axis aligned) points as keys.
837+
* The points are defined with 32bit 'float' floating point coordinates.
838+
* See 'PhTreeD' for details.
839+
*/
840+
template <
841+
dimension_t DIM,
842+
typename T,
843+
typename CONVERTER = ConverterFloatIEEE<DIM>,
844+
typename BUCKET = b_plus_tree_hash_set<T>>
845+
using PhTreeMultiMapF = PhTreeMultiMap<DIM, T, CONVERTER, BUCKET>;
846+
847+
/**
848+
* A PH-Tree that uses (axis aligned) boxes as keys.
849+
* See 'PhTreeD' for details.
850+
*/
836851
template <
837852
dimension_t DIM,
838853
typename T,
@@ -843,7 +858,6 @@ using PhTreeMultiMapBox = PhTreeMultiMap<DIM, T, CONVERTER_BOX, BUCKET, false, Q
843858
/**
844859
* A PH-Tree multi-map that uses (axis aligned) boxes as keys.
845860
* The boxes are defined with 64bit 'double' floating point coordinates.
846-
*
847861
* See 'PhTreeD' for details.
848862
*/
849863
template <
@@ -853,6 +867,18 @@ template <
853867
typename BUCKET = b_plus_tree_hash_set<T>>
854868
using PhTreeMultiMapBoxD = PhTreeMultiMapBox<DIM, T, CONVERTER_BOX, BUCKET>;
855869

870+
/**
871+
* A PH-Tree multi-map that uses (axis aligned) boxes as keys.
872+
* The boxes are defined with 32bit 'float' floating point coordinates.
873+
* See 'PhTreeD' for details.
874+
*/
875+
template <
876+
dimension_t DIM,
877+
typename T,
878+
typename CONVERTER_BOX = ConverterBoxFloatIEEE<DIM>,
879+
typename BUCKET = b_plus_tree_hash_set<T>>
880+
using PhTreeMultiMapBoxF = PhTreeMultiMapBox<DIM, T, CONVERTER_BOX, BUCKET>;
881+
856882
} // namespace improbable::phtree
857883

858884
#endif // PHTREE_PHTREE_MULTIMAP_H

0 commit comments

Comments
 (0)