tnfr 4.5.2__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 (195) hide show
  1. tnfr/__init__.py +275 -51
  2. tnfr/__init__.pyi +33 -0
  3. tnfr/_compat.py +10 -0
  4. tnfr/_generated_version.py +34 -0
  5. tnfr/_version.py +49 -0
  6. tnfr/_version.pyi +7 -0
  7. tnfr/alias.py +117 -31
  8. tnfr/alias.pyi +108 -0
  9. tnfr/cache.py +6 -572
  10. tnfr/cache.pyi +16 -0
  11. tnfr/callback_utils.py +16 -38
  12. tnfr/callback_utils.pyi +79 -0
  13. tnfr/cli/__init__.py +34 -14
  14. tnfr/cli/__init__.pyi +26 -0
  15. tnfr/cli/arguments.py +211 -28
  16. tnfr/cli/arguments.pyi +27 -0
  17. tnfr/cli/execution.py +470 -50
  18. tnfr/cli/execution.pyi +70 -0
  19. tnfr/cli/utils.py +18 -3
  20. tnfr/cli/utils.pyi +8 -0
  21. tnfr/config/__init__.py +13 -0
  22. tnfr/config/__init__.pyi +10 -0
  23. tnfr/{constants_glyphs.py → config/constants.py} +26 -20
  24. tnfr/config/constants.pyi +12 -0
  25. tnfr/config/feature_flags.py +83 -0
  26. tnfr/{config.py → config/init.py} +11 -7
  27. tnfr/config/init.pyi +8 -0
  28. tnfr/config/operator_names.py +93 -0
  29. tnfr/config/operator_names.pyi +28 -0
  30. tnfr/config/presets.py +84 -0
  31. tnfr/config/presets.pyi +7 -0
  32. tnfr/constants/__init__.py +80 -29
  33. tnfr/constants/__init__.pyi +92 -0
  34. tnfr/constants/aliases.py +31 -0
  35. tnfr/constants/core.py +4 -4
  36. tnfr/constants/core.pyi +17 -0
  37. tnfr/constants/init.py +1 -1
  38. tnfr/constants/init.pyi +12 -0
  39. tnfr/constants/metric.py +7 -15
  40. tnfr/constants/metric.pyi +19 -0
  41. tnfr/dynamics/__init__.py +165 -633
  42. tnfr/dynamics/__init__.pyi +82 -0
  43. tnfr/dynamics/adaptation.py +267 -0
  44. tnfr/dynamics/aliases.py +23 -0
  45. tnfr/dynamics/coordination.py +385 -0
  46. tnfr/dynamics/dnfr.py +2283 -400
  47. tnfr/dynamics/dnfr.pyi +24 -0
  48. tnfr/dynamics/integrators.py +406 -98
  49. tnfr/dynamics/integrators.pyi +34 -0
  50. tnfr/dynamics/runtime.py +881 -0
  51. tnfr/dynamics/sampling.py +10 -5
  52. tnfr/dynamics/sampling.pyi +7 -0
  53. tnfr/dynamics/selectors.py +719 -0
  54. tnfr/execution.py +70 -48
  55. tnfr/execution.pyi +45 -0
  56. tnfr/flatten.py +13 -9
  57. tnfr/flatten.pyi +21 -0
  58. tnfr/gamma.py +66 -53
  59. tnfr/gamma.pyi +34 -0
  60. tnfr/glyph_history.py +110 -52
  61. tnfr/glyph_history.pyi +35 -0
  62. tnfr/glyph_runtime.py +16 -0
  63. tnfr/glyph_runtime.pyi +9 -0
  64. tnfr/immutable.py +69 -28
  65. tnfr/immutable.pyi +34 -0
  66. tnfr/initialization.py +16 -16
  67. tnfr/initialization.pyi +65 -0
  68. tnfr/io.py +6 -240
  69. tnfr/io.pyi +16 -0
  70. tnfr/locking.pyi +7 -0
  71. tnfr/mathematics/__init__.py +81 -0
  72. tnfr/mathematics/backend.py +426 -0
  73. tnfr/mathematics/dynamics.py +398 -0
  74. tnfr/mathematics/epi.py +254 -0
  75. tnfr/mathematics/generators.py +222 -0
  76. tnfr/mathematics/metrics.py +119 -0
  77. tnfr/mathematics/operators.py +233 -0
  78. tnfr/mathematics/operators_factory.py +71 -0
  79. tnfr/mathematics/projection.py +78 -0
  80. tnfr/mathematics/runtime.py +173 -0
  81. tnfr/mathematics/spaces.py +247 -0
  82. tnfr/mathematics/transforms.py +292 -0
  83. tnfr/metrics/__init__.py +10 -10
  84. tnfr/metrics/__init__.pyi +20 -0
  85. tnfr/metrics/coherence.py +993 -324
  86. tnfr/metrics/common.py +23 -16
  87. tnfr/metrics/common.pyi +46 -0
  88. tnfr/metrics/core.py +251 -35
  89. tnfr/metrics/core.pyi +13 -0
  90. tnfr/metrics/diagnosis.py +708 -111
  91. tnfr/metrics/diagnosis.pyi +85 -0
  92. tnfr/metrics/export.py +27 -15
  93. tnfr/metrics/glyph_timing.py +232 -42
  94. tnfr/metrics/reporting.py +33 -22
  95. tnfr/metrics/reporting.pyi +12 -0
  96. tnfr/metrics/sense_index.py +987 -43
  97. tnfr/metrics/sense_index.pyi +9 -0
  98. tnfr/metrics/trig.py +214 -23
  99. tnfr/metrics/trig.pyi +13 -0
  100. tnfr/metrics/trig_cache.py +115 -22
  101. tnfr/metrics/trig_cache.pyi +10 -0
  102. tnfr/node.py +542 -136
  103. tnfr/node.pyi +178 -0
  104. tnfr/observers.py +152 -35
  105. tnfr/observers.pyi +31 -0
  106. tnfr/ontosim.py +23 -19
  107. tnfr/ontosim.pyi +28 -0
  108. tnfr/operators/__init__.py +601 -82
  109. tnfr/operators/__init__.pyi +45 -0
  110. tnfr/operators/definitions.py +513 -0
  111. tnfr/operators/definitions.pyi +78 -0
  112. tnfr/operators/grammar.py +760 -0
  113. tnfr/operators/jitter.py +107 -38
  114. tnfr/operators/jitter.pyi +11 -0
  115. tnfr/operators/registry.py +75 -0
  116. tnfr/operators/registry.pyi +13 -0
  117. tnfr/operators/remesh.py +149 -88
  118. tnfr/py.typed +0 -0
  119. tnfr/rng.py +46 -143
  120. tnfr/rng.pyi +14 -0
  121. tnfr/schemas/__init__.py +8 -0
  122. tnfr/schemas/grammar.json +94 -0
  123. tnfr/selector.py +25 -19
  124. tnfr/selector.pyi +19 -0
  125. tnfr/sense.py +72 -62
  126. tnfr/sense.pyi +23 -0
  127. tnfr/structural.py +522 -262
  128. tnfr/structural.pyi +69 -0
  129. tnfr/telemetry/__init__.py +35 -0
  130. tnfr/telemetry/cache_metrics.py +226 -0
  131. tnfr/telemetry/nu_f.py +423 -0
  132. tnfr/telemetry/nu_f.pyi +123 -0
  133. tnfr/telemetry/verbosity.py +37 -0
  134. tnfr/tokens.py +1 -3
  135. tnfr/tokens.pyi +36 -0
  136. tnfr/trace.py +270 -113
  137. tnfr/trace.pyi +40 -0
  138. tnfr/types.py +574 -6
  139. tnfr/types.pyi +331 -0
  140. tnfr/units.py +69 -0
  141. tnfr/units.pyi +16 -0
  142. tnfr/utils/__init__.py +217 -0
  143. tnfr/utils/__init__.pyi +202 -0
  144. tnfr/utils/cache.py +2395 -0
  145. tnfr/utils/cache.pyi +468 -0
  146. tnfr/utils/chunks.py +104 -0
  147. tnfr/utils/chunks.pyi +21 -0
  148. tnfr/{collections_utils.py → utils/data.py} +147 -90
  149. tnfr/utils/data.pyi +64 -0
  150. tnfr/utils/graph.py +85 -0
  151. tnfr/utils/graph.pyi +10 -0
  152. tnfr/utils/init.py +770 -0
  153. tnfr/utils/init.pyi +78 -0
  154. tnfr/utils/io.py +456 -0
  155. tnfr/{helpers → utils}/numeric.py +51 -24
  156. tnfr/utils/numeric.pyi +21 -0
  157. tnfr/validation/__init__.py +113 -0
  158. tnfr/validation/__init__.pyi +77 -0
  159. tnfr/validation/compatibility.py +95 -0
  160. tnfr/validation/compatibility.pyi +6 -0
  161. tnfr/validation/grammar.py +71 -0
  162. tnfr/validation/grammar.pyi +40 -0
  163. tnfr/validation/graph.py +138 -0
  164. tnfr/validation/graph.pyi +17 -0
  165. tnfr/validation/rules.py +281 -0
  166. tnfr/validation/rules.pyi +55 -0
  167. tnfr/validation/runtime.py +263 -0
  168. tnfr/validation/runtime.pyi +31 -0
  169. tnfr/validation/soft_filters.py +170 -0
  170. tnfr/validation/soft_filters.pyi +37 -0
  171. tnfr/validation/spectral.py +159 -0
  172. tnfr/validation/spectral.pyi +46 -0
  173. tnfr/validation/syntax.py +40 -0
  174. tnfr/validation/syntax.pyi +10 -0
  175. tnfr/validation/window.py +39 -0
  176. tnfr/validation/window.pyi +1 -0
  177. tnfr/viz/__init__.py +9 -0
  178. tnfr/viz/matplotlib.py +246 -0
  179. tnfr-7.0.0.dist-info/METADATA +179 -0
  180. tnfr-7.0.0.dist-info/RECORD +185 -0
  181. {tnfr-4.5.2.dist-info → tnfr-7.0.0.dist-info}/licenses/LICENSE.md +1 -1
  182. tnfr/grammar.py +0 -344
  183. tnfr/graph_utils.py +0 -84
  184. tnfr/helpers/__init__.py +0 -71
  185. tnfr/import_utils.py +0 -228
  186. tnfr/json_utils.py +0 -162
  187. tnfr/logging_utils.py +0 -116
  188. tnfr/presets.py +0 -60
  189. tnfr/validators.py +0 -84
  190. tnfr/value_utils.py +0 -59
  191. tnfr-4.5.2.dist-info/METADATA +0 -379
  192. tnfr-4.5.2.dist-info/RECORD +0 -67
  193. {tnfr-4.5.2.dist-info → tnfr-7.0.0.dist-info}/WHEEL +0 -0
  194. {tnfr-4.5.2.dist-info → tnfr-7.0.0.dist-info}/entry_points.txt +0 -0
  195. {tnfr-4.5.2.dist-info → tnfr-7.0.0.dist-info}/top_level.txt +0 -0
tnfr/alias.py CHANGED
@@ -7,32 +7,30 @@ 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
- from collections.abc import Iterable, Sized
12
+ from collections.abc import Iterable, Mapping, MutableMapping, Sized
12
13
  from dataclasses import dataclass
14
+ from functools import lru_cache, partial
15
+ from threading import Lock
16
+ from types import ModuleType
13
17
  from typing import (
18
+ TYPE_CHECKING,
14
19
  Any,
15
20
  Callable,
16
- TypeVar,
17
- Optional,
18
21
  Generic,
19
22
  Hashable,
20
- TYPE_CHECKING,
23
+ Optional,
24
+ TypeVar,
21
25
  cast,
22
26
  )
23
27
 
24
- from functools import lru_cache, partial
25
- from threading import Lock
26
-
27
- from .constants import get_aliases
28
- from .value_utils import convert_value
29
-
30
- ALIAS_VF = get_aliases("VF")
31
- ALIAS_DNFR = get_aliases("DNFR")
32
- ALIAS_THETA = get_aliases("THETA")
28
+ from .constants.aliases import ALIAS_DNFR, ALIAS_THETA, ALIAS_VF
29
+ from .types import FloatArray, NodeId
30
+ from .utils import convert_value
33
31
 
34
32
  if TYPE_CHECKING: # pragma: no cover
35
- import networkx # type: ignore[import-untyped]
33
+ import networkx
36
34
 
37
35
  T = TypeVar("T")
38
36
 
@@ -132,6 +130,8 @@ class AliasAccessor(Generic[T]):
132
130
  log_level: int | None = None,
133
131
  conv: Callable[[Any], T] | None = None,
134
132
  ) -> Optional[T]:
133
+ """Return ``value`` for the first alias present in ``d``."""
134
+
135
135
  aliases, conv, default = self._prepare(aliases, conv, default)
136
136
  cache_key, key = self._resolve_cache_key(d, aliases)
137
137
  if key is not None:
@@ -168,6 +168,8 @@ class AliasAccessor(Generic[T]):
168
168
  value: Any,
169
169
  conv: Callable[[Any], T] | None = None,
170
170
  ) -> T:
171
+ """Write ``value`` under the first matching alias and cache the choice."""
172
+
171
173
  aliases, conv, _ = self._prepare(aliases, conv)
172
174
  cache_key, key = self._resolve_cache_key(d, aliases)
173
175
  if key is not None:
@@ -184,6 +186,25 @@ class AliasAccessor(Generic[T]):
184
186
  _generic_accessor: AliasAccessor[Any] = AliasAccessor()
185
187
 
186
188
 
189
+ def get_theta_attr(
190
+ d: Mapping[str, Any],
191
+ default: T | None = None,
192
+ *,
193
+ strict: bool = False,
194
+ log_level: int | None = None,
195
+ conv: Callable[[Any], T] = float,
196
+ ) -> T | None:
197
+ """Return ``theta``/``phase`` using the English alias set."""
198
+ return _generic_accessor.get(
199
+ cast(dict[str, Any], d),
200
+ ALIAS_THETA,
201
+ default,
202
+ strict=strict,
203
+ log_level=log_level,
204
+ conv=conv,
205
+ )
206
+
207
+
187
208
  def get_attr(
188
209
  d: dict[str, Any],
189
210
  aliases: Iterable[str],
@@ -207,12 +228,12 @@ def get_attr(
207
228
 
208
229
  def collect_attr(
209
230
  G: "networkx.Graph",
210
- nodes: Iterable[Any],
231
+ nodes: Iterable[NodeId],
211
232
  aliases: Iterable[str],
212
233
  default: float = 0.0,
213
234
  *,
214
- np=None,
215
- ):
235
+ np: ModuleType | None = None,
236
+ ) -> FloatArray | list[float]:
216
237
  """Collect attribute values for ``nodes`` from ``G`` using ``aliases``.
217
238
 
218
239
  Parameters
@@ -235,7 +256,7 @@ def collect_attr(
235
256
  Collected attribute values in the same order as ``nodes``.
236
257
  """
237
258
 
238
- def _nodes_iter_and_size(nodes: Iterable[Any]) -> tuple[Iterable[Any], int]:
259
+ def _nodes_iter_and_size(nodes: Iterable[NodeId]) -> tuple[Iterable[NodeId], int]:
239
260
  if nodes is G.nodes:
240
261
  return G.nodes, G.number_of_nodes()
241
262
  if isinstance(nodes, Sized):
@@ -245,13 +266,46 @@ def collect_attr(
245
266
 
246
267
  nodes_iter, size = _nodes_iter_and_size(nodes)
247
268
 
269
+ def _value(node: NodeId) -> float:
270
+ return float(get_attr(G.nodes[node], aliases, default))
271
+
248
272
  if np is not None:
249
- return np.fromiter(
250
- (get_attr(G.nodes[n], aliases, default) for n in nodes_iter),
251
- float,
252
- count=size,
273
+ values: FloatArray = np.fromiter(
274
+ (_value(n) for n in nodes_iter), float, count=size
253
275
  )
254
- return [get_attr(G.nodes[n], aliases, default) for n in nodes_iter]
276
+ return values
277
+ return [_value(n) for n in nodes_iter]
278
+
279
+
280
+ def collect_theta_attr(
281
+ G: "networkx.Graph",
282
+ nodes: Iterable[NodeId],
283
+ default: float = 0.0,
284
+ *,
285
+ np: ModuleType | None = None,
286
+ ) -> FloatArray | list[float]:
287
+ """Collect ``theta`` values honouring the English-only attribute contract."""
288
+
289
+ def _nodes_iter_and_size(nodes: Iterable[NodeId]) -> tuple[Iterable[NodeId], int]:
290
+ if nodes is G.nodes:
291
+ return G.nodes, G.number_of_nodes()
292
+ if isinstance(nodes, Sized):
293
+ return nodes, len(nodes) # type: ignore[arg-type]
294
+ nodes_list = list(nodes)
295
+ return nodes_list, len(nodes_list)
296
+
297
+ nodes_iter, size = _nodes_iter_and_size(nodes)
298
+
299
+ def _value(node: NodeId) -> float:
300
+ return float(get_theta_attr(G.nodes[node], default))
301
+
302
+ if np is not None:
303
+ values: FloatArray = np.fromiter(
304
+ (_value(n) for n in nodes_iter), float, count=size
305
+ )
306
+ return values
307
+
308
+ return [_value(n) for n in nodes_iter]
255
309
 
256
310
 
257
311
  def set_attr_generic(
@@ -273,8 +327,16 @@ get_attr_str = partial(get_attr, conv=str)
273
327
  set_attr_str = partial(set_attr_generic, conv=str)
274
328
 
275
329
 
330
+ def set_theta_attr(d: MutableMapping[str, Any], value: Any) -> float:
331
+ """Assign ``theta``/``phase`` using the English attribute names."""
332
+ result = float(value)
333
+ d["theta"] = result
334
+ d["phase"] = result
335
+ return result
336
+
337
+
276
338
  # -------------------------
277
- # Máximos globales con caché
339
+ # Cached global maxima
278
340
  # -------------------------
279
341
 
280
342
 
@@ -388,9 +450,7 @@ def _update_cached_abs_max(
388
450
  cur_node = cast(Hashable | None, G.graph.get(node_key))
389
451
 
390
452
  if val >= cur:
391
- return _compute_abs_max_result(
392
- G, aliases, key=key, candidate=(n, val)
393
- )
453
+ return _compute_abs_max_result(G, aliases, key=key, candidate=(n, val))
394
454
  if cur_node == n:
395
455
  return _compute_abs_max_result(G, aliases, key=key)
396
456
  return AbsMaxResult(max_value=cur, node=cur_node)
@@ -461,9 +521,7 @@ def set_scalar(
461
521
  return set_attr_and_cache(G, n, alias, value, cache=cache, extra=extra)
462
522
 
463
523
 
464
- def _increment_trig_version(
465
- G: "networkx.Graph", _: Hashable, __: float
466
- ) -> None:
524
+ def _increment_trig_version(G: "networkx.Graph", _: Hashable, __: float) -> None:
467
525
  """Increment cached trig version to invalidate trig caches."""
468
526
  g = G.graph
469
527
  g["_trig_version"] = int(g.get("_trig_version", 0)) + 1
@@ -484,7 +542,7 @@ SCALAR_SETTERS: dict[str, dict[str, Any]] = {
484
542
  "theta": {
485
543
  "alias": ALIAS_THETA,
486
544
  "extra": _increment_trig_version,
487
- "doc": "Set ``θ`` for node ``n`` and invalidate trig caches.",
545
+ "doc": "Set ``theta`` for node ``n`` and invalidate trig caches.",
488
546
  },
489
547
  }
490
548
 
@@ -529,14 +587,42 @@ for _name, _spec in SCALAR_SETTERS.items():
529
587
  del _name, _spec, _make_scalar_setter
530
588
 
531
589
 
590
+ _set_theta_impl = cast(
591
+ Callable[["networkx.Graph", Hashable, float], AbsMaxResult | None],
592
+ globals()["set_theta"],
593
+ )
594
+
595
+
596
+ def _set_theta_with_compat(
597
+ G: "networkx.Graph", n: Hashable, value: float
598
+ ) -> AbsMaxResult | None:
599
+ nd = cast(MutableMapping[str, Any], G.nodes[n])
600
+ result = _set_theta_impl(G, n, value)
601
+ theta_val = get_theta_attr(nd, value)
602
+ if theta_val is not None:
603
+ float_theta = float(theta_val)
604
+ nd["theta"] = float_theta
605
+ nd["phase"] = float_theta
606
+ return result
607
+
608
+
609
+ _set_theta_with_compat.__name__ = "set_theta"
610
+ _set_theta_with_compat.__qualname__ = "set_theta"
611
+ _set_theta_with_compat.__doc__ = _set_theta_impl.__doc__
612
+ globals()["set_theta"] = _set_theta_with_compat
613
+
614
+
532
615
  __all__ = [
533
616
  "AbsMaxResult",
534
617
  "set_attr_generic",
535
618
  "get_attr",
619
+ "get_theta_attr",
536
620
  "collect_attr",
621
+ "collect_theta_attr",
537
622
  "set_attr",
538
623
  "get_attr_str",
539
624
  "set_attr_str",
625
+ "set_theta_attr",
540
626
  "set_attr_and_cache",
541
627
  "set_attr_with_max",
542
628
  "set_scalar",
tnfr/alias.pyi ADDED
@@ -0,0 +1,108 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Callable, Iterable, Mapping, MutableMapping
4
+ from types import ModuleType
5
+ from typing import TYPE_CHECKING, Any, Hashable, TypeVar
6
+
7
+ from .types import FloatArray, NodeId
8
+
9
+ if TYPE_CHECKING:
10
+ import networkx as nx
11
+
12
+ T = TypeVar("T")
13
+
14
+ __all__: list[str]
15
+
16
+ def __getattr__(name: str) -> Any: ...
17
+
18
+ class AbsMaxResult:
19
+ max_value: float
20
+ node: Hashable | None
21
+
22
+ SCALAR_SETTERS: dict[str, dict[str, Any]]
23
+
24
+ def get_attr(
25
+ d: dict[str, Any],
26
+ aliases: Iterable[str],
27
+ default: T | None = ...,
28
+ *,
29
+ strict: bool = ...,
30
+ log_level: int | None = ...,
31
+ conv: Callable[[Any], T] = ...,
32
+ ) -> T | None: ...
33
+ def get_theta_attr(
34
+ d: Mapping[str, Any],
35
+ default: T | None = ...,
36
+ *,
37
+ strict: bool = ...,
38
+ log_level: int | None = ...,
39
+ conv: Callable[[Any], T] = ...,
40
+ ) -> T | None: ...
41
+ def collect_attr(
42
+ G: "nx.Graph",
43
+ nodes: Iterable[NodeId],
44
+ aliases: Iterable[str],
45
+ default: float = ...,
46
+ *,
47
+ np: ModuleType | None = ...,
48
+ ) -> FloatArray | list[float]: ...
49
+ def collect_theta_attr(
50
+ G: "nx.Graph",
51
+ nodes: Iterable[NodeId],
52
+ default: float = ...,
53
+ *,
54
+ np: ModuleType | None = ...,
55
+ ) -> FloatArray | list[float]: ...
56
+ def set_attr_generic(
57
+ d: dict[str, Any],
58
+ aliases: Iterable[str],
59
+ value: Any,
60
+ *,
61
+ conv: Callable[[Any], T],
62
+ ) -> T: ...
63
+ def set_attr(
64
+ d: dict[str, Any],
65
+ aliases: Iterable[str],
66
+ value: Any,
67
+ conv: Callable[[Any], T] = ...,
68
+ ) -> T: ...
69
+ def get_attr_str(
70
+ d: dict[str, Any],
71
+ aliases: Iterable[str],
72
+ default: str | None = ...,
73
+ *,
74
+ strict: bool = ...,
75
+ log_level: int | None = ...,
76
+ conv: Callable[[Any], str] = ...,
77
+ ) -> str | None: ...
78
+ def set_attr_str(d: dict[str, Any], aliases: Iterable[str], value: Any) -> str: ...
79
+ def set_theta_attr(d: MutableMapping[str, Any], value: Any) -> float: ...
80
+ def multi_recompute_abs_max(
81
+ G: "nx.Graph", alias_map: Mapping[str, tuple[str, ...]]
82
+ ) -> dict[str, float]: ...
83
+ def set_attr_and_cache(
84
+ G: "nx.Graph",
85
+ n: Hashable,
86
+ aliases: tuple[str, ...],
87
+ value: float,
88
+ *,
89
+ cache: str | None = ...,
90
+ extra: Callable[["nx.Graph", Hashable, float], None] | None = ...,
91
+ ) -> AbsMaxResult | None: ...
92
+ def set_attr_with_max(
93
+ G: "nx.Graph", n: Hashable, aliases: tuple[str, ...], value: float, *, cache: str
94
+ ) -> AbsMaxResult: ...
95
+ def set_scalar(
96
+ G: "nx.Graph",
97
+ n: Hashable,
98
+ alias: tuple[str, ...],
99
+ value: float,
100
+ *,
101
+ cache: str | None = ...,
102
+ extra: Callable[["nx.Graph", Hashable, float], None] | None = ...,
103
+ ) -> AbsMaxResult | None: ...
104
+ def set_vf(
105
+ G: "nx.Graph", n: Hashable, value: float, *, update_max: bool = ...
106
+ ) -> AbsMaxResult | None: ...
107
+ def set_dnfr(G: "nx.Graph", n: Hashable, value: float) -> AbsMaxResult | None: ...
108
+ def set_theta(G: "nx.Graph", n: Hashable, value: float) -> AbsMaxResult | None: ...