about summary refs log tree commit diff stats
path: root/src/network_set.h
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-05-15 11:09:23 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-05-15 11:09:23 -0400
commita5a6c1b8b902c960f8204f8d814ce579dfd5fa50 (patch)
treebad31379c4a52496260377bfce8321ae2c2f8a3c /src/network_set.h
parentf4354d64021d2c6833a59a1b64fb30f87d1175bc (diff)
downloadlingo-ap-tracker-a5a6c1b8b902c960f8204f8d814ce579dfd5fa50.tar.gz
lingo-ap-tracker-a5a6c1b8b902c960f8204f8d814ce579dfd5fa50.tar.bz2
lingo-ap-tracker-a5a6c1b8b902c960f8204f8d814ce579dfd5fa50.zip
Hovering over a connection only shows nearest hops
Diffstat (limited to 'src/network_set.h')
-rw-r--r--src/network_set.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/network_set.h b/src/network_set.h index e0ef043..e6f0c07 100644 --- a/src/network_set.h +++ b/src/network_set.h
@@ -11,18 +11,15 @@ class NetworkSet {
11 public: 11 public:
12 void Clear(); 12 void Clear();
13 13
14 int AddLink(int id1, int id2); 14 void AddLink(int id1, int id2);
15 15
16 bool IsItemInNetwork(int id) const; 16 bool IsItemInNetwork(int id) const;
17 17
18 int GetNetworkWithItem(int id) const;
19
20 const std::set<std::pair<int, int>>& GetNetworkGraph(int id) const; 18 const std::set<std::pair<int, int>>& GetNetworkGraph(int id) const;
21 19
22 private: 20 private:
23 21
24 std::vector<std::set<std::pair<int, int>>> networks_; 22 std::map<int, std::set<std::pair<int, int>>> network_by_item_;
25 std::map<int, int> network_by_item_;
26}; 23};
27 24
28#endif /* end of include guard: NETWORK_SET_H_3036B8E3 */ 25#endif /* end of include guard: NETWORK_SET_H_3036B8E3 */