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.
- tnfr/__init__.py +50 -5
- tnfr/__init__.pyi +0 -7
- tnfr/_compat.py +0 -1
- tnfr/_generated_version.py +34 -0
- tnfr/_version.py +44 -2
- tnfr/alias.py +14 -13
- tnfr/alias.pyi +5 -37
- tnfr/cache.py +9 -729
- tnfr/cache.pyi +8 -224
- tnfr/callback_utils.py +16 -31
- tnfr/callback_utils.pyi +3 -29
- tnfr/cli/__init__.py +17 -11
- tnfr/cli/__init__.pyi +0 -21
- tnfr/cli/arguments.py +175 -14
- tnfr/cli/arguments.pyi +5 -11
- tnfr/cli/execution.py +434 -48
- tnfr/cli/execution.pyi +14 -24
- tnfr/cli/utils.py +20 -3
- tnfr/cli/utils.pyi +5 -5
- tnfr/config/__init__.py +2 -1
- tnfr/config/__init__.pyi +2 -0
- tnfr/config/feature_flags.py +83 -0
- tnfr/config/init.py +1 -1
- tnfr/config/operator_names.py +1 -14
- tnfr/config/presets.py +6 -26
- tnfr/constants/__init__.py +10 -13
- tnfr/constants/__init__.pyi +10 -22
- tnfr/constants/aliases.py +31 -0
- tnfr/constants/core.py +4 -3
- tnfr/constants/init.py +1 -1
- tnfr/constants/metric.py +3 -3
- tnfr/dynamics/__init__.py +64 -10
- tnfr/dynamics/__init__.pyi +3 -4
- tnfr/dynamics/adaptation.py +79 -13
- tnfr/dynamics/aliases.py +10 -9
- tnfr/dynamics/coordination.py +77 -35
- tnfr/dynamics/dnfr.py +575 -274
- tnfr/dynamics/dnfr.pyi +1 -10
- tnfr/dynamics/integrators.py +47 -33
- tnfr/dynamics/integrators.pyi +0 -1
- tnfr/dynamics/runtime.py +489 -129
- tnfr/dynamics/sampling.py +2 -0
- tnfr/dynamics/selectors.py +101 -62
- tnfr/execution.py +15 -8
- tnfr/execution.pyi +5 -25
- tnfr/flatten.py +7 -3
- tnfr/flatten.pyi +1 -8
- tnfr/gamma.py +22 -26
- tnfr/gamma.pyi +0 -6
- tnfr/glyph_history.py +37 -26
- tnfr/glyph_history.pyi +1 -19
- tnfr/glyph_runtime.py +16 -0
- tnfr/glyph_runtime.pyi +9 -0
- tnfr/immutable.py +20 -15
- tnfr/immutable.pyi +4 -7
- tnfr/initialization.py +5 -7
- tnfr/initialization.pyi +1 -9
- tnfr/io.py +6 -305
- tnfr/io.pyi +13 -8
- tnfr/mathematics/__init__.py +81 -0
- tnfr/mathematics/backend.py +426 -0
- tnfr/mathematics/dynamics.py +398 -0
- tnfr/mathematics/epi.py +254 -0
- tnfr/mathematics/generators.py +222 -0
- tnfr/mathematics/metrics.py +119 -0
- tnfr/mathematics/operators.py +233 -0
- tnfr/mathematics/operators_factory.py +71 -0
- tnfr/mathematics/projection.py +78 -0
- tnfr/mathematics/runtime.py +173 -0
- tnfr/mathematics/spaces.py +247 -0
- tnfr/mathematics/transforms.py +292 -0
- tnfr/metrics/__init__.py +10 -10
- tnfr/metrics/coherence.py +123 -94
- tnfr/metrics/common.py +22 -13
- tnfr/metrics/common.pyi +42 -11
- tnfr/metrics/core.py +72 -14
- tnfr/metrics/diagnosis.py +48 -57
- tnfr/metrics/diagnosis.pyi +3 -7
- tnfr/metrics/export.py +3 -5
- tnfr/metrics/glyph_timing.py +41 -31
- tnfr/metrics/reporting.py +13 -6
- tnfr/metrics/sense_index.py +884 -114
- tnfr/metrics/trig.py +167 -11
- tnfr/metrics/trig.pyi +1 -0
- tnfr/metrics/trig_cache.py +112 -15
- tnfr/node.py +400 -17
- tnfr/node.pyi +55 -38
- tnfr/observers.py +111 -8
- tnfr/observers.pyi +0 -15
- tnfr/ontosim.py +9 -6
- tnfr/ontosim.pyi +0 -5
- tnfr/operators/__init__.py +529 -42
- tnfr/operators/__init__.pyi +14 -0
- tnfr/operators/definitions.py +350 -18
- tnfr/operators/definitions.pyi +0 -14
- tnfr/operators/grammar.py +760 -0
- tnfr/operators/jitter.py +28 -22
- tnfr/operators/registry.py +7 -12
- tnfr/operators/registry.pyi +0 -2
- tnfr/operators/remesh.py +38 -61
- tnfr/rng.py +17 -300
- tnfr/schemas/__init__.py +8 -0
- tnfr/schemas/grammar.json +94 -0
- tnfr/selector.py +3 -4
- tnfr/selector.pyi +1 -1
- tnfr/sense.py +22 -24
- tnfr/sense.pyi +0 -7
- tnfr/structural.py +504 -21
- tnfr/structural.pyi +41 -18
- tnfr/telemetry/__init__.py +23 -1
- tnfr/telemetry/cache_metrics.py +226 -0
- tnfr/telemetry/nu_f.py +423 -0
- tnfr/telemetry/nu_f.pyi +123 -0
- tnfr/tokens.py +1 -4
- tnfr/tokens.pyi +1 -6
- tnfr/trace.py +20 -53
- tnfr/trace.pyi +9 -37
- tnfr/types.py +244 -15
- tnfr/types.pyi +200 -14
- tnfr/units.py +69 -0
- tnfr/units.pyi +16 -0
- tnfr/utils/__init__.py +107 -48
- tnfr/utils/__init__.pyi +80 -11
- tnfr/utils/cache.py +1705 -65
- tnfr/utils/cache.pyi +370 -58
- tnfr/utils/chunks.py +104 -0
- tnfr/utils/chunks.pyi +21 -0
- tnfr/utils/data.py +95 -5
- tnfr/utils/data.pyi +8 -17
- tnfr/utils/graph.py +2 -4
- tnfr/utils/init.py +31 -7
- tnfr/utils/init.pyi +4 -11
- tnfr/utils/io.py +313 -14
- tnfr/{helpers → utils}/numeric.py +50 -24
- tnfr/utils/numeric.pyi +21 -0
- tnfr/validation/__init__.py +92 -4
- tnfr/validation/__init__.pyi +77 -17
- tnfr/validation/compatibility.py +79 -43
- tnfr/validation/compatibility.pyi +4 -6
- tnfr/validation/grammar.py +55 -133
- tnfr/validation/grammar.pyi +37 -8
- tnfr/validation/graph.py +138 -0
- tnfr/validation/graph.pyi +17 -0
- tnfr/validation/rules.py +161 -74
- tnfr/validation/rules.pyi +55 -18
- tnfr/validation/runtime.py +263 -0
- tnfr/validation/runtime.pyi +31 -0
- tnfr/validation/soft_filters.py +170 -0
- tnfr/validation/soft_filters.pyi +37 -0
- tnfr/validation/spectral.py +159 -0
- tnfr/validation/spectral.pyi +46 -0
- tnfr/validation/syntax.py +28 -139
- tnfr/validation/syntax.pyi +7 -4
- tnfr/validation/window.py +39 -0
- tnfr/validation/window.pyi +1 -0
- tnfr/viz/__init__.py +9 -0
- tnfr/viz/matplotlib.py +246 -0
- {tnfr-6.0.0.dist-info → tnfr-7.0.0.dist-info}/METADATA +63 -19
- tnfr-7.0.0.dist-info/RECORD +185 -0
- {tnfr-6.0.0.dist-info → tnfr-7.0.0.dist-info}/licenses/LICENSE.md +1 -1
- tnfr/constants_glyphs.py +0 -16
- tnfr/constants_glyphs.pyi +0 -12
- tnfr/grammar.py +0 -25
- tnfr/grammar.pyi +0 -13
- tnfr/helpers/__init__.py +0 -151
- tnfr/helpers/__init__.pyi +0 -66
- tnfr/helpers/numeric.pyi +0 -12
- tnfr/presets.py +0 -15
- tnfr/presets.pyi +0 -7
- tnfr/utils/io.pyi +0 -10
- tnfr/utils/validators.py +0 -130
- tnfr/utils/validators.pyi +0 -19
- tnfr-6.0.0.dist-info/RECORD +0 -157
- {tnfr-6.0.0.dist-info → tnfr-7.0.0.dist-info}/WHEEL +0 -0
- {tnfr-6.0.0.dist-info → tnfr-7.0.0.dist-info}/entry_points.txt +0 -0
- {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(
|
|
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
|
-
|
|
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
|
|
267
|
-
__all__.
|
|
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
|
@@ -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
|
-
"""
|
|
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
|
-
|
|
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
|
|
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(
|
|
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(
|
|
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],
|
|
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: ...
|