#ifndef TILEHELPER_H #define TILEHELPER_H #include namespace nemo_interface { namespace coordinate { template inline std::int64_t getHash(const Coordinate &t) { return double(t.latitude()) ^ double(t.longitude()) ^ double(t.altitude()); } } // namespace coordinate namespace coordinate_array { template inline std::int64_t getHash(const Container &c) { std::int64_t hash = 0; for (const auto &entry : c) { hash ^= coordinate::getHash(entry); } } } // namespace coordinate_array namespace tile { template inline std::int64_t getHash(const Tile &t) { return coordinate_array::getHash(t.tile()); } } // namespace tile namespace tile_array { template inline getHash(const Container &c) { std::int64_t hash = 0; for (const auto &entry : c) { hash ^= tile::getHash(entry); } } } // namespace tile_array namespace labeled_progress { template inline getHash(const LabeledProgress &lp) { return std::int64_t(lp.id()) ^ double(lp.progress()); } namespace progress_array { template inline getHash(const Container &c) { std::int64_t hash = 0; for (const auto &entry : c) { hash ^= labeled_progress::getHash(entry); } } } // namespace progress_array } // namespace labeled_progress } // namespace nemo_interface #endif // TILEHELPER_H