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-06-06 15:54:41 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-06-06 15:54:41 -0400
commit8ddab49cc13d809ca75dcd7f645661a3d3cb05c4 (patch)
treeba1e5f3237dbb7cdc939c35e193f5e6e46845a77 /src/network_set.h
parentac38dd0a5c394eefc39b7a8cf7b96762f18c8b31 (diff)
parent6f5287b3921c843a6b322ccbdfcbef00a8f16980 (diff)
downloadlingo-ap-tracker-8ddab49cc13d809ca75dcd7f645661a3d3cb05c4.tar.gz
lingo-ap-tracker-8ddab49cc13d809ca75dcd7f645661a3d3cb05c4.tar.bz2
lingo-ap-tracker-8ddab49cc13d809ca75dcd7f645661a3d3cb05c4.zip
Merge branch 'subway'
Diffstat (limited to 'src/network_set.h')
-rw-r--r--src/network_set.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/network_set.h b/src/network_set.h new file mode 100644 index 0000000..e6f0c07 --- /dev/null +++ b/src/network_set.h
@@ -0,0 +1,25 @@
1#ifndef NETWORK_SET_H_3036B8E3
2#define NETWORK_SET_H_3036B8E3
3
4#include <map>
5#include <optional>
6#include <set>
7#include <utility>
8#include <vector>
9
10class NetworkSet {
11 public:
12 void Clear();
13
14 void AddLink(int id1, int id2);
15
16 bool IsItemInNetwork(int id) const;
17
18 const std::set<std::pair<int, int>>& GetNetworkGraph(int id) const;
19
20 private:
21
22 std::map<int, std::set<std::pair<int, int>>> network_by_item_;
23};
24
25#endif /* end of include guard: NETWORK_SET_H_3036B8E3 */