More work on diff xmit, not finished yet

This commit is contained in:
2021-07-25 19:22:39 -04:00
parent 49a4ec220d
commit 9f342854e1
13 changed files with 304 additions and 100 deletions

View File

@@ -76,6 +76,7 @@
#include <cstdint>
#include <vector>
#include <map>
#include "util.hpp"
class PlaneMap;
@@ -118,11 +119,16 @@ private:
void insert(const std::string &plane, int64_t cell, PlaneItem *client);
public:
using IdVec = std::vector<int64_t>;
using IdVector = util::IdVector;
PlaneMap();
~PlaneMap();
IdVec scan_radius(const std::string &plane, double x, double y, double radius, int64_t prepend) const;
// Caution: scan_radius is not deterministically ordered.
IdVector scan_radius(const std::string &plane, double x, double y, double radius, int64_t prepend) const;
// Unions and sorts two ID vectors.
static IdVector sort_union_id_vectors(const IdVector &v1, const IdVector &v2);
private:
// unit testing stuff.
friend int unittests_planemap(lua_State *L);