simulation-alg 0.1.6__tar.gz → 0.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/Cargo.lock +1 -1
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/Cargo.toml +1 -1
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/PKG-INFO +1 -1
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/pyproject.toml +1 -1
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/simulation.pyi +11 -1
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/tests/test_hyper_simulation.py +2 -2
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/.github/workflows/ci.yml +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/.gitignore +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/.gitmodules +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/LICENSE +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/README.md +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/hyper-simulation.log +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/python/__init__.py +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/requirements.txt +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/src/graph/hypergraph.rs +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/src/graph/mod.rs +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/src/graph/networkx_graph.rs +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/src/lib.rs +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/src/utils.rs +0 -0
- {simulation_alg-0.1.6 → simulation_alg-0.1.7}/tests/test_simulation.py +0 -0
|
@@ -57,10 +57,17 @@ class DMatch:
|
|
|
57
57
|
def __init__(self) -> None: ...
|
|
58
58
|
@staticmethod
|
|
59
59
|
def from_dict(d_match_by_sc_id: dict[tuple[int, int], set[tuple[int, int]]]) -> 'DMatch': ...
|
|
60
|
+
"""
|
|
61
|
+
Register the d-match by sematic cluster's id, from `add_sematic_cluster_pair`.
|
|
62
|
+
For a sematic cluster pair by `id`, we set map[(id, id)] = R as the relation, where (u_id, v_id) in R, are node's id.
|
|
63
|
+
"""
|
|
60
64
|
|
|
61
65
|
class Delta:
|
|
62
66
|
def __init__(self) -> None: ...
|
|
63
67
|
def add_sematic_cluster_pair(self, u: Node, v: Node, cluster_u: list[Hyperedge], cluster_v: list[Hyperedge]) -> int: ...
|
|
68
|
+
"""
|
|
69
|
+
Add a sematic of (u, v), register a id of the pair that, (cluster_u, id) and (cluster_v, id)
|
|
70
|
+
"""
|
|
64
71
|
|
|
65
72
|
class Hypergraph:
|
|
66
73
|
"""
|
|
@@ -72,7 +79,10 @@ class Hypergraph:
|
|
|
72
79
|
|
|
73
80
|
def add_hyperedge(self, hyperedge: Hyperedge): ...
|
|
74
81
|
|
|
75
|
-
def set_type_same_fn(self, type_same_fn: Callable[[
|
|
82
|
+
def set_type_same_fn(self, type_same_fn: Callable[[int, int], bool]): ... # L(v) = L(u)
|
|
83
|
+
"""
|
|
84
|
+
Set a function as the Denial Comment, where inputs the id of the nodes, and return if is conflict.
|
|
85
|
+
"""
|
|
76
86
|
|
|
77
87
|
def set_l_predicate_fn(self, l_predicate_fn: Callable[[Hyperedge, Hyperedge], bool]): ... # L_P(e1, e2)
|
|
78
88
|
|
|
@@ -20,11 +20,11 @@ def l_match_fn(hyperedge1: Hyperedge, hyperedge2: Hyperedge) -> dict[int, set[in
|
|
|
20
20
|
mapping[id1] = {id2}
|
|
21
21
|
return mapping
|
|
22
22
|
|
|
23
|
-
def label_same_fn(
|
|
23
|
+
def label_same_fn(id1: int, id2: int) -> bool:
|
|
24
24
|
"""
|
|
25
25
|
Check if two nodes are the same based on their descriptions.
|
|
26
26
|
"""
|
|
27
|
-
return
|
|
27
|
+
return id1 == id2
|
|
28
28
|
|
|
29
29
|
if __name__ == "__main__":
|
|
30
30
|
# Create a hypergraph
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|