diff options
Diffstat (limited to 'chilbert/chilbert.hpp')
-rw-r--r-- | chilbert/chilbert.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chilbert/chilbert.hpp b/chilbert/chilbert.hpp index 7a69ab2..e8d10f4 100644 --- a/chilbert/chilbert.hpp +++ b/chilbert/chilbert.hpp @@ -25,7 +25,7 @@ namespace chilbert { /** Map the point `p` to a Hilbert Index. * - * @tparam P Type used to represent a value in a point dimension. + * @tparam P Array-like type with [] operator that represents a point. * @tparam H Hilbert Index. * * @param p Point with `n` dimensions. @@ -34,11 +34,11 @@ namespace chilbert { * @param[out] h Hilbert Index. */ template <class P, class H> -inline void coords_to_index(const P* p, size_t m, size_t n, H& h); +inline void coords_to_index(const P& p, size_t m, size_t n, H& h); /** Map the Hilbert Index `p` to a point. * - * @tparam P Type used to represent a value in a point dimension. + * @tparam P Array-like type with [] operator that represents a point. * @tparam H Hilbert Index. * * @param[out] p Point with `n` dimensions. @@ -47,11 +47,11 @@ inline void coords_to_index(const P* p, size_t m, size_t n, H& h); * @param h Hilbert Index. */ template <class P, class H> -inline void index_to_coords(P* p, size_t m, size_t n, const H& h); +inline void index_to_coords(P& p, size_t m, size_t n, const H& h); /** Map the point `p` to a Compact Hilbert Index. * - * @tparam P Type used to represent a value in a point dimension. + * @tparam P Array-like type with [] operator that represents a point. * @tparam H Compact Hilbert Index. * * @param p Point with `n` dimensions. @@ -62,7 +62,7 @@ inline void index_to_coords(P* p, size_t m, size_t n, const H& h); * @param m Optional largest precision in `m`. */ template <class P, class H> -inline void coords_to_compact_index(const P* p, +inline void coords_to_compact_index(const P& p, const size_t* ms, size_t n, H& hc, @@ -71,7 +71,7 @@ inline void coords_to_compact_index(const P* p, /** Map the Compact Hilbert Index `hc` to a point. * - * @tparam P Type used to represent a value in a point dimension. + * @tparam P Array-like type with [] operator that represents a point. * @tparam H Compact Hilbert Index. * * @param[out] p Point with `n` dimensions. @@ -82,7 +82,7 @@ inline void coords_to_compact_index(const P* p, * @param m Optional largest precision in `m`. */ template <class P, class H> -inline void compact_index_to_coords(P* p, +inline void compact_index_to_coords(P& p, const size_t* ms, size_t n, const H& hc, |