diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-06-09 22:43:20 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-06-09 22:43:20 -0400 |
commit | 475b7a38f66071ad5713f6f00a49c4e1399e0613 (patch) | |
tree | 4dcb76d5bb9e1dbabe19dcbd0cc9676c31f715e6 /src/network_set.h | |
parent | 829bb6ba7fdbef5c4e6fb9e4eabc0c2f962325ae (diff) | |
parent | 14d075e02007aeb53dbadd6c629564ee467cd7b2 (diff) | |
download | lingo-ap-tracker-475b7a38f66071ad5713f6f00a49c4e1399e0613.tar.gz lingo-ap-tracker-475b7a38f66071ad5713f6f00a49c4e1399e0613.tar.bz2 lingo-ap-tracker-475b7a38f66071ad5713f6f00a49c4e1399e0613.zip |
Merge branch 'main' into panels
Diffstat (limited to 'src/network_set.h')
-rw-r--r-- | src/network_set.h | 25 |
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 | |||
10 | class 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 */ | ||