@@ -17,22 +17,6 @@ class PkbTableTransformers {
17
17
static std::vector<std::vector<bool >> closeWarshallReachabilityMatrix (
18
18
KeysTable<std::size_t , std::unordered_set<std::size_t >> keysTable);
19
19
20
- /* * @brief Composes keysTable with itself, once.
21
- Where `result` is the returned value, firstly copies keysTable.map to `result`
22
- by iterating through each key in keysTable.keys to get the value mapped by
23
- keysTable.map, to insert the key-value pair in `result`. Then, iterating
24
- through each key in keysTable.keys to get the key-values pair p1 in `result`,
25
- for each p1.value in p1.values, for each key-values pair p2 in `result` with
26
- p2.key equivalent to p1.value, concatenates the unordered_set of values
27
- `result[p1.key]` with p2.values.
28
- @param keysTable An associative container that contains key-values pairs with
29
- unique keys. There is a binary relation between keys and values.
30
- @return The composition of keysTable with itself.
31
- */
32
- template <class T >
33
- static KeysTable<T, std::unordered_set<T>>
34
- closeOnce (KeysTable<T, T> keysTable);
35
-
36
20
/* * @brief Auxiliary function of PkbTableTransformers::closeFlatten. For
37
21
algorithm details, see PkbTableTransformers::closeFlatten.
38
22
@param parent The parent for which all its descendants will be recursively
@@ -49,6 +33,22 @@ class PkbTableTransformers {
49
33
KeysTable<T, std::unordered_set<T>> &mapCloseFlattened);
50
34
51
35
public:
36
+ /* * @brief Composes keysTable with itself, once.
37
+ Where `result` is the returned value, firstly copies keysTable.map to `result`
38
+ by iterating through each key in keysTable.keys to get the value mapped by
39
+ keysTable.map, to insert the key-value pair in `result`. Then, iterating
40
+ through each key in keysTable.keys to get the key-values pair p1 in `result`,
41
+ for each p1.value in p1.values, for each key-values pair p2 in `result` with
42
+ p2.key equivalent to p1.value, concatenates the unordered_set of values
43
+ `result[p1.key]` with p2.values.
44
+ @param keysTable An associative container that contains key-values pairs with
45
+ unique keys. There is a binary relation between keys and values.
46
+ @return The composition of keysTable with itself.
47
+ */
48
+ template <class T >
49
+ static KeysTable<T, std::unordered_set<T>>
50
+ closeOnce (KeysTable<T, T> keysTable);
51
+
52
52
/* * @brief Composes two tables, where variantTable maps to a `std::variant`.
53
53
@param variantTable Table that maps keys `T` to a `std::variant` of values `V`
54
54
and intermediate values `U`.
0 commit comments