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.
@@ -543,7 +543,7 @@ dependencies = [
543
543
 
544
544
  [[package]]
545
545
  name = "simulation"
546
- version = "0.1.6"
546
+ version = "0.1.7"
547
547
  dependencies = [
548
548
  "graph-base",
549
549
  "graph-simulation",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "simulation"
3
- version = "0.1.6"
3
+ version = "0.1.7"
4
4
  edition = "2021"
5
5
  license = "MIT"
6
6
  description = "A Python package for simulation algorithms"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simulation-alg
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "simulation-alg"
7
- version = "0.1.6"
7
+ version = "0.1.7"
8
8
  requires-python = ">=3.10"
9
9
  classifiers = [
10
10
  "Programming Language :: Rust",
@@ -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[[str, str], bool]): ... # L(v) = L(u)
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(desc1: str, desc2: str) -> bool:
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 desc1 == desc2
27
+ return id1 == id2
28
28
 
29
29
  if __name__ == "__main__":
30
30
  # Create a hypergraph
File without changes
File without changes