osrm-backend/include/util/hilbert_value.hpp

31 lines
582 B
C++
Raw Normal View History

#ifndef HILBERT_VALUE_HPP
#define HILBERT_VALUE_HPP
#include <cstdint>
2016-01-05 10:51:13 -05:00
namespace osrm
{
namespace util
{
// computes a 64 bit value that corresponds to the hilbert space filling curve
struct FixedPointCoordinate;
class HilbertCode
2014-03-17 10:12:13 -04:00
{
public:
uint64_t operator()(const FixedPointCoordinate &current_coordinate) const;
HilbertCode() {}
HilbertCode(const HilbertCode &) = delete;
private:
inline uint64_t BitInterleaving(const uint32_t a, const uint32_t b) const;
inline void TransposeCoordinate(uint32_t *X) const;
};
2016-01-05 10:51:13 -05:00
}
}
#endif /* HILBERT_VALUE_HPP */