tnfr 6.0.0__py3-none-any.whl → 7.0.0__py3-none-any.whl

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.

Potentially problematic release.


This version of tnfr might be problematic. Click here for more details.

Files changed (176) hide show
  1. tnfr/__init__.py +50 -5
  2. tnfr/__init__.pyi +0 -7
  3. tnfr/_compat.py +0 -1
  4. tnfr/_generated_version.py +34 -0
  5. tnfr/_version.py +44 -2
  6. tnfr/alias.py +14 -13
  7. tnfr/alias.pyi +5 -37
  8. tnfr/cache.py +9 -729
  9. tnfr/cache.pyi +8 -224
  10. tnfr/callback_utils.py +16 -31
  11. tnfr/callback_utils.pyi +3 -29
  12. tnfr/cli/__init__.py +17 -11
  13. tnfr/cli/__init__.pyi +0 -21
  14. tnfr/cli/arguments.py +175 -14
  15. tnfr/cli/arguments.pyi +5 -11
  16. tnfr/cli/execution.py +434 -48
  17. tnfr/cli/execution.pyi +14 -24
  18. tnfr/cli/utils.py +20 -3
  19. tnfr/cli/utils.pyi +5 -5
  20. tnfr/config/__init__.py +2 -1
  21. tnfr/config/__init__.pyi +2 -0
  22. tnfr/config/feature_flags.py +83 -0
  23. tnfr/config/init.py +1 -1
  24. tnfr/config/operator_names.py +1 -14
  25. tnfr/config/presets.py +6 -26
  26. tnfr/constants/__init__.py +10 -13
  27. tnfr/constants/__init__.pyi +10 -22
  28. tnfr/constants/aliases.py +31 -0
  29. tnfr/constants/core.py +4 -3
  30. tnfr/constants/init.py +1 -1
  31. tnfr/constants/metric.py +3 -3
  32. tnfr/dynamics/__init__.py +64 -10
  33. tnfr/dynamics/__init__.pyi +3 -4
  34. tnfr/dynamics/adaptation.py +79 -13
  35. tnfr/dynamics/aliases.py +10 -9
  36. tnfr/dynamics/coordination.py +77 -35
  37. tnfr/dynamics/dnfr.py +575 -274
  38. tnfr/dynamics/dnfr.pyi +1 -10
  39. tnfr/dynamics/integrators.py +47 -33
  40. tnfr/dynamics/integrators.pyi +0 -1
  41. tnfr/dynamics/runtime.py +489 -129
  42. tnfr/dynamics/sampling.py +2 -0
  43. tnfr/dynamics/selectors.py +101 -62
  44. tnfr/execution.py +15 -8
  45. tnfr/execution.pyi +5 -25
  46. tnfr/flatten.py +7 -3
  47. tnfr/flatten.pyi +1 -8
  48. tnfr/gamma.py +22 -26
  49. tnfr/gamma.pyi +0 -6
  50. tnfr/glyph_history.py +37 -26
  51. tnfr/glyph_history.pyi +1 -19
  52. tnfr/glyph_runtime.py +16 -0
  53. tnfr/glyph_runtime.pyi +9 -0
  54. tnfr/immutable.py +20 -15
  55. tnfr/immutable.pyi +4 -7
  56. tnfr/initialization.py +5 -7
  57. tnfr/initialization.pyi +1 -9
  58. tnfr/io.py +6 -305
  59. tnfr/io.pyi +13 -8
  60. tnfr/mathematics/__init__.py +81 -0
  61. tnfr/mathematics/backend.py +426 -0
  62. tnfr/mathematics/dynamics.py +398 -0
  63. tnfr/mathematics/epi.py +254 -0
  64. tnfr/mathematics/generators.py +222 -0
  65. tnfr/mathematics/metrics.py +119 -0
  66. tnfr/mathematics/operators.py +233 -0
  67. tnfr/mathematics/operators_factory.py +71 -0
  68. tnfr/mathematics/projection.py +78 -0
  69. tnfr/mathematics/runtime.py +173 -0
  70. tnfr/mathematics/spaces.py +247 -0
  71. tnfr/mathematics/transforms.py +292 -0
  72. tnfr/metrics/__init__.py +10 -10
  73. tnfr/metrics/coherence.py +123 -94
  74. tnfr/metrics/common.py +22 -13
  75. tnfr/metrics/common.pyi +42 -11
  76. tnfr/metrics/core.py +72 -14
  77. tnfr/metrics/diagnosis.py +48 -57
  78. tnfr/metrics/diagnosis.pyi +3 -7
  79. tnfr/metrics/export.py +3 -5
  80. tnfr/metrics/glyph_timing.py +41 -31
  81. tnfr/metrics/reporting.py +13 -6
  82. tnfr/metrics/sense_index.py +884 -114
  83. tnfr/metrics/trig.py +167 -11
  84. tnfr/metrics/trig.pyi +1 -0
  85. tnfr/metrics/trig_cache.py +112 -15
  86. tnfr/node.py +400 -17
  87. tnfr/node.pyi +55 -38
  88. tnfr/observers.py +111 -8
  89. tnfr/observers.pyi +0 -15
  90. tnfr/ontosim.py +9 -6
  91. tnfr/ontosim.pyi +0 -5
  92. tnfr/operators/__init__.py +529 -42
  93. tnfr/operators/__init__.pyi +14 -0
  94. tnfr/operators/definitions.py +350 -18
  95. tnfr/operators/definitions.pyi +0 -14
  96. tnfr/operators/grammar.py +760 -0
  97. tnfr/operators/jitter.py +28 -22
  98. tnfr/operators/registry.py +7 -12
  99. tnfr/operators/registry.pyi +0 -2
  100. tnfr/operators/remesh.py +38 -61
  101. tnfr/rng.py +17 -300
  102. tnfr/schemas/__init__.py +8 -0
  103. tnfr/schemas/grammar.json +94 -0
  104. tnfr/selector.py +3 -4
  105. tnfr/selector.pyi +1 -1
  106. tnfr/sense.py +22 -24
  107. tnfr/sense.pyi +0 -7
  108. tnfr/structural.py +504 -21
  109. tnfr/structural.pyi +41 -18
  110. tnfr/telemetry/__init__.py +23 -1
  111. tnfr/telemetry/cache_metrics.py +226 -0
  112. tnfr/telemetry/nu_f.py +423 -0
  113. tnfr/telemetry/nu_f.pyi +123 -0
  114. tnfr/tokens.py +1 -4
  115. tnfr/tokens.pyi +1 -6
  116. tnfr/trace.py +20 -53
  117. tnfr/trace.pyi +9 -37
  118. tnfr/types.py +244 -15
  119. tnfr/types.pyi +200 -14
  120. tnfr/units.py +69 -0
  121. tnfr/units.pyi +16 -0
  122. tnfr/utils/__init__.py +107 -48
  123. tnfr/utils/__init__.pyi +80 -11
  124. tnfr/utils/cache.py +1705 -65
  125. tnfr/utils/cache.pyi +370 -58
  126. tnfr/utils/chunks.py +104 -0
  127. tnfr/utils/chunks.pyi +21 -0
  128. tnfr/utils/data.py +95 -5
  129. tnfr/utils/data.pyi +8 -17
  130. tnfr/utils/graph.py +2 -4
  131. tnfr/utils/init.py +31 -7
  132. tnfr/utils/init.pyi +4 -11
  133. tnfr/utils/io.py +313 -14
  134. tnfr/{helpers → utils}/numeric.py +50 -24
  135. tnfr/utils/numeric.pyi +21 -0
  136. tnfr/validation/__init__.py +92 -4
  137. tnfr/validation/__init__.pyi +77 -17
  138. tnfr/validation/compatibility.py +79 -43
  139. tnfr/validation/compatibility.pyi +4 -6
  140. tnfr/validation/grammar.py +55 -133
  141. tnfr/validation/grammar.pyi +37 -8
  142. tnfr/validation/graph.py +138 -0
  143. tnfr/validation/graph.pyi +17 -0
  144. tnfr/validation/rules.py +161 -74
  145. tnfr/validation/rules.pyi +55 -18
  146. tnfr/validation/runtime.py +263 -0
  147. tnfr/validation/runtime.pyi +31 -0
  148. tnfr/validation/soft_filters.py +170 -0
  149. tnfr/validation/soft_filters.pyi +37 -0
  150. tnfr/validation/spectral.py +159 -0
  151. tnfr/validation/spectral.pyi +46 -0
  152. tnfr/validation/syntax.py +28 -139
  153. tnfr/validation/syntax.pyi +7 -4
  154. tnfr/validation/window.py +39 -0
  155. tnfr/validation/window.pyi +1 -0
  156. tnfr/viz/__init__.py +9 -0
  157. tnfr/viz/matplotlib.py +246 -0
  158. {tnfr-6.0.0.dist-info → tnfr-7.0.0.dist-info}/METADATA +63 -19
  159. tnfr-7.0.0.dist-info/RECORD +185 -0
  160. {tnfr-6.0.0.dist-info → tnfr-7.0.0.dist-info}/licenses/LICENSE.md +1 -1
  161. tnfr/constants_glyphs.py +0 -16
  162. tnfr/constants_glyphs.pyi +0 -12
  163. tnfr/grammar.py +0 -25
  164. tnfr/grammar.pyi +0 -13
  165. tnfr/helpers/__init__.py +0 -151
  166. tnfr/helpers/__init__.pyi +0 -66
  167. tnfr/helpers/numeric.pyi +0 -12
  168. tnfr/presets.py +0 -15
  169. tnfr/presets.pyi +0 -7
  170. tnfr/utils/io.pyi +0 -10
  171. tnfr/utils/validators.py +0 -130
  172. tnfr/utils/validators.pyi +0 -19
  173. tnfr-6.0.0.dist-info/RECORD +0 -157
  174. {tnfr-6.0.0.dist-info → tnfr-7.0.0.dist-info}/WHEEL +0 -0
  175. {tnfr-6.0.0.dist-info → tnfr-7.0.0.dist-info}/entry_points.txt +0 -0
  176. {tnfr-6.0.0.dist-info → tnfr-7.0.0.dist-info}/top_level.txt +0 -0
tnfr/__init__.py CHANGED
@@ -43,7 +43,6 @@ from importlib import import_module, metadata
43
43
  from importlib.metadata import PackageNotFoundError
44
44
  from typing import Any, Callable, NoReturn
45
45
 
46
-
47
46
  EXPORT_DEPENDENCIES: dict[str, dict[str, tuple[str, ...]]] = {
48
47
  "step": {
49
48
  "submodules": ("tnfr.dynamics",),
@@ -76,6 +75,21 @@ EXPORT_DEPENDENCIES: dict[str, dict[str, tuple[str, ...]]] = {
76
75
  ),
77
76
  "third_party": ("networkx",),
78
77
  },
78
+ "create_math_nfr": {
79
+ "submodules": (
80
+ "tnfr.structural",
81
+ "tnfr.constants",
82
+ "tnfr.dynamics",
83
+ "tnfr.operators.definitions",
84
+ "tnfr.operators.registry",
85
+ "tnfr.validation",
86
+ "tnfr.mathematics",
87
+ ),
88
+ "third_party": (
89
+ "networkx",
90
+ "numpy",
91
+ ),
92
+ },
79
93
  "run_sequence": {
80
94
  "submodules": (
81
95
  "tnfr.structural",
@@ -87,6 +101,27 @@ EXPORT_DEPENDENCIES: dict[str, dict[str, tuple[str, ...]]] = {
87
101
  ),
88
102
  "third_party": ("networkx",),
89
103
  },
104
+ "get_hz_bridge": {
105
+ "submodules": (
106
+ "tnfr.units",
107
+ "tnfr.constants",
108
+ ),
109
+ "third_party": ("networkx",),
110
+ },
111
+ "hz_str_to_hz": {
112
+ "submodules": (
113
+ "tnfr.units",
114
+ "tnfr.constants",
115
+ ),
116
+ "third_party": ("networkx",),
117
+ },
118
+ "hz_to_hz_str": {
119
+ "submodules": (
120
+ "tnfr.units",
121
+ "tnfr.constants",
122
+ ),
123
+ "third_party": ("networkx",),
124
+ },
90
125
  }
91
126
 
92
127
 
@@ -184,7 +219,9 @@ def _validate_export_dependencies() -> None:
184
219
  f"helper '{export_name}' is missing '{key}' dependencies in EXPORT_DEPENDENCIES"
185
220
  )
186
221
 
187
- missing_exports = manifest_names.difference(export_names).difference(_MISSING_EXPORTS)
222
+ missing_exports = manifest_names.difference(export_names).difference(
223
+ _MISSING_EXPORTS
224
+ )
188
225
  for manifest_only in sorted(missing_exports):
189
226
  entry = manifest[manifest_only]
190
227
  if not isinstance(entry, dict):
@@ -235,7 +272,12 @@ _assign_exports("dynamics", ("step", "run"))
235
272
  _HAS_PREPARE_NETWORK = _assign_exports("ontosim", ("prepare_network",))
236
273
 
237
274
 
238
- _HAS_RUN_SEQUENCE = _assign_exports("structural", ("create_nfr", "run_sequence"))
275
+ _HAS_STRUCTURAL_EXPORTS = _assign_exports(
276
+ "structural", ("create_nfr", "run_sequence", "create_math_nfr")
277
+ )
278
+
279
+
280
+ _assign_exports("units", ("get_hz_bridge", "hz_str_to_hz", "hz_to_hz_str"))
239
281
 
240
282
 
241
283
  def _emit_missing_dependency_warning() -> None:
@@ -261,10 +303,13 @@ __all__ = [
261
303
  "run",
262
304
  "prepare_network",
263
305
  "create_nfr",
306
+ "get_hz_bridge",
307
+ "hz_str_to_hz",
308
+ "hz_to_hz_str",
264
309
  ]
265
310
 
266
- if _HAS_RUN_SEQUENCE:
267
- __all__.append("run_sequence")
311
+ if _HAS_STRUCTURAL_EXPORTS:
312
+ __all__.extend(["run_sequence", "create_math_nfr"])
268
313
 
269
314
 
270
315
  _validate_export_dependencies()
tnfr/__init__.pyi CHANGED
@@ -15,25 +15,18 @@ _MISSING_EXPORTS: dict[str, dict[str, Any]]
15
15
  __version__: str
16
16
  __all__: list[str]
17
17
 
18
-
19
18
  class ExportDependencyError(RuntimeError):
20
19
  """Raised when the export dependency manifest is inconsistent."""
21
20
 
22
-
23
21
  def _is_internal_import_error(exc: ImportError) -> bool: ...
24
-
25
22
  def _missing_dependency(
26
23
  name: str,
27
24
  exc: ImportError,
28
25
  *,
29
26
  module: str | None = ...,
30
27
  ) -> Callable[..., NoReturn]: ...
31
-
32
-
33
28
  def _validate_export_dependencies() -> None: ...
34
-
35
29
  def _assign_exports(module: str, names: tuple[str, ...]) -> bool: ...
36
-
37
30
  def _emit_missing_dependency_warning() -> None: ...
38
31
 
39
32
  _HAS_PREPARE_NETWORK: bool
tnfr/_compat.py CHANGED
@@ -8,4 +8,3 @@ except (ImportError, AttributeError): # pragma: no cover - Python < 3.10
8
8
  from typing_extensions import TypeAlias # type: ignore[assignment]
9
9
 
10
10
  __all__ = ["TypeAlias"]
11
-
@@ -0,0 +1,34 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
12
+
13
+ TYPE_CHECKING = False
14
+ if TYPE_CHECKING:
15
+ from typing import Tuple
16
+ from typing import Union
17
+
18
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
20
+ else:
21
+ VERSION_TUPLE = object
22
+ COMMIT_ID = object
23
+
24
+ version: str
25
+ __version__: str
26
+ __version_tuple__: VERSION_TUPLE
27
+ version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
30
+
31
+ __version__ = version = '7.0.0'
32
+ __version_tuple__ = version_tuple = (7, 0, 0)
33
+
34
+ __commit_id__ = commit_id = None
tnfr/_version.py CHANGED
@@ -1,7 +1,49 @@
1
- """Package version for :mod:`tnfr`."""
1
+ """Runtime version discovery for :mod:`tnfr`."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import os
6
+ from importlib import metadata
7
+ from typing import Final
8
+
5
9
  __all__ = ["__version__"]
6
10
 
7
- __version__ = "6.0.0"
11
+
12
+ def _read_version() -> str:
13
+ """Resolve the published package version while preserving TNFR invariants."""
14
+
15
+ env_version = os.environ.get("TNFR_VERSION")
16
+ if env_version:
17
+ return env_version
18
+
19
+ try:
20
+ return metadata.version("tnfr")
21
+ except metadata.PackageNotFoundError:
22
+ pass
23
+
24
+ try: # pragma: no cover - only present in built distributions
25
+ from . import _generated_version # type: ignore
26
+ except ImportError: # pragma: no cover - optional artifact
27
+ pass
28
+ else:
29
+ generated = getattr(_generated_version, "version", None)
30
+ if isinstance(generated, str) and generated:
31
+ return generated
32
+ legacy = getattr(_generated_version, "__version__", None)
33
+ if isinstance(legacy, str) and legacy:
34
+ return legacy
35
+
36
+ try:
37
+ from setuptools_scm import get_version
38
+ except Exception: # pragma: no cover - optional dependency
39
+ pass
40
+ else:
41
+ try:
42
+ return get_version(relative_to=__file__)
43
+ except LookupError:
44
+ pass
45
+
46
+ return "0.0.0"
47
+
48
+
49
+ __version__: Final[str] = _read_version()
tnfr/alias.py CHANGED
@@ -7,6 +7,7 @@ alias-based attribute access. Legacy wrappers ``alias_get`` and
7
7
  """
8
8
 
9
9
  from __future__ import annotations
10
+
10
11
  from collections import defaultdict
11
12
  from collections.abc import Iterable, Mapping, MutableMapping, Sized
12
13
  from dataclasses import dataclass
@@ -24,14 +25,10 @@ from typing import (
24
25
  cast,
25
26
  )
26
27
 
27
- from .constants import get_aliases
28
+ from .constants.aliases import ALIAS_DNFR, ALIAS_THETA, ALIAS_VF
28
29
  from .types import FloatArray, NodeId
29
30
  from .utils import convert_value
30
31
 
31
- ALIAS_VF = get_aliases("VF")
32
- ALIAS_DNFR = get_aliases("DNFR")
33
- ALIAS_THETA = get_aliases("THETA")
34
-
35
32
  if TYPE_CHECKING: # pragma: no cover
36
33
  import networkx
37
34
 
@@ -133,6 +130,8 @@ class AliasAccessor(Generic[T]):
133
130
  log_level: int | None = None,
134
131
  conv: Callable[[Any], T] | None = None,
135
132
  ) -> Optional[T]:
133
+ """Return ``value`` for the first alias present in ``d``."""
134
+
136
135
  aliases, conv, default = self._prepare(aliases, conv, default)
137
136
  cache_key, key = self._resolve_cache_key(d, aliases)
138
137
  if key is not None:
@@ -169,6 +168,8 @@ class AliasAccessor(Generic[T]):
169
168
  value: Any,
170
169
  conv: Callable[[Any], T] | None = None,
171
170
  ) -> T:
171
+ """Write ``value`` under the first matching alias and cache the choice."""
172
+
172
173
  aliases, conv, _ = self._prepare(aliases, conv)
173
174
  cache_key, key = self._resolve_cache_key(d, aliases)
174
175
  if key is not None:
@@ -269,7 +270,9 @@ def collect_attr(
269
270
  return float(get_attr(G.nodes[node], aliases, default))
270
271
 
271
272
  if np is not None:
272
- values: FloatArray = np.fromiter((_value(n) for n in nodes_iter), float, count=size)
273
+ values: FloatArray = np.fromiter(
274
+ (_value(n) for n in nodes_iter), float, count=size
275
+ )
273
276
  return values
274
277
  return [_value(n) for n in nodes_iter]
275
278
 
@@ -297,7 +300,9 @@ def collect_theta_attr(
297
300
  return float(get_theta_attr(G.nodes[node], default))
298
301
 
299
302
  if np is not None:
300
- values: FloatArray = np.fromiter((_value(n) for n in nodes_iter), float, count=size)
303
+ values: FloatArray = np.fromiter(
304
+ (_value(n) for n in nodes_iter), float, count=size
305
+ )
301
306
  return values
302
307
 
303
308
  return [_value(n) for n in nodes_iter]
@@ -445,9 +450,7 @@ def _update_cached_abs_max(
445
450
  cur_node = cast(Hashable | None, G.graph.get(node_key))
446
451
 
447
452
  if val >= cur:
448
- return _compute_abs_max_result(
449
- G, aliases, key=key, candidate=(n, val)
450
- )
453
+ return _compute_abs_max_result(G, aliases, key=key, candidate=(n, val))
451
454
  if cur_node == n:
452
455
  return _compute_abs_max_result(G, aliases, key=key)
453
456
  return AbsMaxResult(max_value=cur, node=cur_node)
@@ -518,9 +521,7 @@ def set_scalar(
518
521
  return set_attr_and_cache(G, n, alias, value, cache=cache, extra=extra)
519
522
 
520
523
 
521
- def _increment_trig_version(
522
- G: "networkx.Graph", _: Hashable, __: float
523
- ) -> None:
524
+ def _increment_trig_version(G: "networkx.Graph", _: Hashable, __: float) -> None:
524
525
  """Increment cached trig version to invalidate trig caches."""
525
526
  g = G.graph
526
527
  g["_trig_version"] = int(g.get("_trig_version", 0)) + 1
tnfr/alias.pyi CHANGED
@@ -15,15 +15,12 @@ __all__: list[str]
15
15
 
16
16
  def __getattr__(name: str) -> Any: ...
17
17
 
18
-
19
18
  class AbsMaxResult:
20
19
  max_value: float
21
20
  node: Hashable | None
22
21
 
23
-
24
22
  SCALAR_SETTERS: dict[str, dict[str, Any]]
25
23
 
26
-
27
24
  def get_attr(
28
25
  d: dict[str, Any],
29
26
  aliases: Iterable[str],
@@ -33,8 +30,6 @@ def get_attr(
33
30
  log_level: int | None = ...,
34
31
  conv: Callable[[Any], T] = ...,
35
32
  ) -> T | None: ...
36
-
37
-
38
33
  def get_theta_attr(
39
34
  d: Mapping[str, Any],
40
35
  default: T | None = ...,
@@ -43,8 +38,6 @@ def get_theta_attr(
43
38
  log_level: int | None = ...,
44
39
  conv: Callable[[Any], T] = ...,
45
40
  ) -> T | None: ...
46
-
47
-
48
41
  def collect_attr(
49
42
  G: "nx.Graph",
50
43
  nodes: Iterable[NodeId],
@@ -53,8 +46,6 @@ def collect_attr(
53
46
  *,
54
47
  np: ModuleType | None = ...,
55
48
  ) -> FloatArray | list[float]: ...
56
-
57
-
58
49
  def collect_theta_attr(
59
50
  G: "nx.Graph",
60
51
  nodes: Iterable[NodeId],
@@ -62,8 +53,6 @@ def collect_theta_attr(
62
53
  *,
63
54
  np: ModuleType | None = ...,
64
55
  ) -> FloatArray | list[float]: ...
65
-
66
-
67
56
  def set_attr_generic(
68
57
  d: dict[str, Any],
69
58
  aliases: Iterable[str],
@@ -71,13 +60,12 @@ def set_attr_generic(
71
60
  *,
72
61
  conv: Callable[[Any], T],
73
62
  ) -> T: ...
74
-
75
-
76
63
  def set_attr(
77
- d: dict[str, Any], aliases: Iterable[str], value: Any, conv: Callable[[Any], T] = ...
64
+ d: dict[str, Any],
65
+ aliases: Iterable[str],
66
+ value: Any,
67
+ conv: Callable[[Any], T] = ...,
78
68
  ) -> T: ...
79
-
80
-
81
69
  def get_attr_str(
82
70
  d: dict[str, Any],
83
71
  aliases: Iterable[str],
@@ -87,19 +75,11 @@ def get_attr_str(
87
75
  log_level: int | None = ...,
88
76
  conv: Callable[[Any], str] = ...,
89
77
  ) -> str | None: ...
90
-
91
-
92
78
  def set_attr_str(d: dict[str, Any], aliases: Iterable[str], value: Any) -> str: ...
93
-
94
-
95
79
  def set_theta_attr(d: MutableMapping[str, Any], value: Any) -> float: ...
96
-
97
-
98
80
  def multi_recompute_abs_max(
99
81
  G: "nx.Graph", alias_map: Mapping[str, tuple[str, ...]]
100
82
  ) -> dict[str, float]: ...
101
-
102
-
103
83
  def set_attr_and_cache(
104
84
  G: "nx.Graph",
105
85
  n: Hashable,
@@ -109,13 +89,9 @@ def set_attr_and_cache(
109
89
  cache: str | None = ...,
110
90
  extra: Callable[["nx.Graph", Hashable, float], None] | None = ...,
111
91
  ) -> AbsMaxResult | None: ...
112
-
113
-
114
92
  def set_attr_with_max(
115
93
  G: "nx.Graph", n: Hashable, aliases: tuple[str, ...], value: float, *, cache: str
116
94
  ) -> AbsMaxResult: ...
117
-
118
-
119
95
  def set_scalar(
120
96
  G: "nx.Graph",
121
97
  n: Hashable,
@@ -125,16 +101,8 @@ def set_scalar(
125
101
  cache: str | None = ...,
126
102
  extra: Callable[["nx.Graph", Hashable, float], None] | None = ...,
127
103
  ) -> AbsMaxResult | None: ...
128
-
129
-
130
104
  def set_vf(
131
105
  G: "nx.Graph", n: Hashable, value: float, *, update_max: bool = ...
132
106
  ) -> AbsMaxResult | None: ...
133
-
134
-
135
107
  def set_dnfr(G: "nx.Graph", n: Hashable, value: float) -> AbsMaxResult | None: ...
136
-
137
-
138
- def set_theta(
139
- G: "nx.Graph", n: Hashable, value: float
140
- ) -> AbsMaxResult | None: ...
108
+ def set_theta(G: "nx.Graph", n: Hashable, value: float) -> AbsMaxResult | None: ...