tnfr 2.0.1__py3-none-any.whl → 3.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 +46 -45
- tnfr/main.py +37 -0
- {tnfr-2.0.1.dist-info → tnfr-3.0.0.dist-info}/METADATA +8 -1
- tnfr-3.0.0.dist-info/RECORD +13 -0
- tnfr-2.0.1.dist-info/RECORD +0 -14
- tnfr-2.0.1.dist-info/entry_points.txt +0 -2
- {tnfr-2.0.1.dist-info → tnfr-3.0.0.dist-info}/WHEEL +0 -0
- {tnfr-2.0.1.dist-info → tnfr-3.0.0.dist-info}/licenses/LICENSE.txt +0 -0
- {tnfr-2.0.1.dist-info → tnfr-3.0.0.dist-info}/top_level.txt +0 -0
tnfr/__init__.py
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
-
import argparse
|
|
3
|
-
import sys
|
|
4
|
-
import networkx as nx
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
3
|
+
"""
|
|
4
|
+
TNFR — Teoría de la Naturaleza Fractal Resonante
|
|
5
|
+
API canónica del paquete.
|
|
6
|
+
|
|
7
|
+
Principio operativo (ecuación nodal):
|
|
8
|
+
∂EPI/∂t = νf · ΔNFR(t)
|
|
9
|
+
|
|
10
|
+
Este paquete expone utilidades para preparar una red (preparar_red),
|
|
11
|
+
ejecutar la dinámica (step, run) y observar coherencia (coherencia_global,
|
|
12
|
+
orden_kuramoto), alineado con la TNFR.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
__version__ = "3.0.0"
|
|
16
|
+
|
|
17
|
+
# Re-exports de la API pública
|
|
18
|
+
from .ontosim import preparar_red
|
|
19
|
+
from .dynamics import step, run, set_delta_nfr_hook
|
|
20
|
+
from .observers import attach_standard_observer, coherencia_global, orden_kuramoto
|
|
21
|
+
|
|
22
|
+
__all__ = [
|
|
23
|
+
"preparar_red",
|
|
24
|
+
"step", "run", "set_delta_nfr_hook",
|
|
25
|
+
"attach_standard_observer", "coherencia_global", "orden_kuramoto",
|
|
26
|
+
"__version__",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
# --- Adaptador de imports internos (compatibilidad sin tocar tus módulos) ---
|
|
30
|
+
# Varios archivos del paquete usan imports absolutos como:
|
|
31
|
+
# from constants import DEFAULTS
|
|
32
|
+
# en lugar de imports relativos:
|
|
33
|
+
# from .constants import DEFAULTS
|
|
34
|
+
# Para no reescribirlos, registramos alias en sys.modules.
|
|
35
|
+
import sys as _sys
|
|
36
|
+
from . import constants as _constants
|
|
37
|
+
from . import helpers as _helpers
|
|
38
|
+
from . import observers as _observers
|
|
39
|
+
from . import dynamics as _dynamics
|
|
40
|
+
from . import operators as _operators
|
|
41
|
+
from . import ontosim as _ontosim
|
|
42
|
+
|
|
43
|
+
_sys.modules.setdefault("constants", _constants)
|
|
44
|
+
_sys.modules.setdefault("helpers", _helpers)
|
|
45
|
+
_sys.modules.setdefault("observers", _observers)
|
|
46
|
+
_sys.modules.setdefault("dynamics", _dynamics)
|
|
47
|
+
_sys.modules.setdefault("operators", _operators)
|
|
48
|
+
_sys.modules.setdefault("ontosim", _ontosim)
|
tnfr/main.py
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
import argparse, sys
|
|
3
|
+
import networkx as nx
|
|
4
|
+
from . import preparar_red, run, __version__
|
|
5
|
+
|
|
6
|
+
def main(argv: list[str] | None = None) -> None:
|
|
7
|
+
p = argparse.ArgumentParser(
|
|
8
|
+
prog="tnfr",
|
|
9
|
+
description="TNFR canónica — demo CLI (red Erdős–Rényi + dinámica glífica)",
|
|
10
|
+
)
|
|
11
|
+
p.add_argument("--version", action="store_true", help="muestra versión y sale")
|
|
12
|
+
p.add_argument("--n", type=int, default=30, help="nodos (Erdős–Rényi)")
|
|
13
|
+
p.add_argument("--p", type=float, default=0.15, help="probabilidad de arista (Erdős–Rényi)")
|
|
14
|
+
p.add_argument("--steps", type=int, default=100, help="pasos a simular")
|
|
15
|
+
p.add_argument("--observer", action="store_true", help="adjunta observador estándar")
|
|
16
|
+
args = p.parse_args(argv)
|
|
17
|
+
|
|
18
|
+
if args.version:
|
|
19
|
+
print(__version__)
|
|
20
|
+
return
|
|
21
|
+
|
|
22
|
+
G = nx.erdos_renyi_graph(args.n, args.p)
|
|
23
|
+
preparar_red(G, ATTACH_STD_OBSERVER=bool(args.observer))
|
|
24
|
+
run(G, args.steps)
|
|
25
|
+
|
|
26
|
+
h = G.graph.get("history", {})
|
|
27
|
+
C = h.get("C_steps", [])[-1] if h.get("C_steps") else None
|
|
28
|
+
stab = h.get("stable_frac", [])[-1] if h.get("stable_frac") else None
|
|
29
|
+
R = h.get("kuramoto_R", [])[-1] if h.get("kuramoto_R") else None
|
|
30
|
+
|
|
31
|
+
print("TNFR terminado:")
|
|
32
|
+
if C is not None: print(f" C(t) ~ {C:.3f}")
|
|
33
|
+
if stab is not None: print(f" estable ~ {stab:.3f}")
|
|
34
|
+
if R is not None: print(f" R (Kuramoto) ~ {R:.3f}")
|
|
35
|
+
|
|
36
|
+
if __name__ == "__main__":
|
|
37
|
+
main(sys.argv[1:])
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tnfr
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: TNFR canónica: dinámica glífica modular sobre redes.
|
|
5
5
|
Author: Fer
|
|
6
6
|
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://pypi.org/project/tnfr/
|
|
8
|
+
Project-URL: Repository, https://github.com/fermga/Teoria-de-la-naturaleza-fractal-resonante-TNFR-
|
|
9
|
+
Keywords: TNFR,fractal resonante,resonancia,glifos,networkx,dinámica,coherencia,EPI,Kuramoto
|
|
7
10
|
Classifier: Programming Language :: Python :: 3
|
|
8
11
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
12
|
Classifier: Programming Language :: Python :: 3.9
|
|
10
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
17
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
18
|
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Intended Audience :: Science/Research
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
15
22
|
Requires-Python: >=3.9
|
|
16
23
|
Description-Content-Type: text/markdown
|
|
17
24
|
License-File: LICENSE.txt
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
tnfr/__init__.py,sha256=5djYn7YqfpOWrakVqJIBNqllDhTAe8xbo682SPC5rbc,1650
|
|
2
|
+
tnfr/constants.py,sha256=_775sPHussR9vgkWRCLC6dzwgk_1_lLnSlWT8sBWR3U,7677
|
|
3
|
+
tnfr/dynamics.py,sha256=7B38c9SVKLVFBrKHeJ1nXbghoRHfDs8Nl9CqUmCcAyI,23260
|
|
4
|
+
tnfr/helpers.py,sha256=tZJsDXc8k9HIfg8BA9cVUEFKBoX1Rfnuhurl2Fvxsy0,6017
|
|
5
|
+
tnfr/main.py,sha256=TEngteuC9MD7Ec9bNGuCC9ym-2ohbh202-HGArCR4tk,1506
|
|
6
|
+
tnfr/observers.py,sha256=MoC-xLJuMP-UYj8cpIVlgSbXDsE1Uj70Zy51PSH3AJY,5192
|
|
7
|
+
tnfr/ontosim.py,sha256=U0IeNVF8rFNhnmWWux91xDc0djTDZQkqRRosP6Z7FmE,5485
|
|
8
|
+
tnfr/operators.py,sha256=M6ahJL8IuB2y4qiEalge5EufCz0eEbhw-O4xfh3NpwE,12146
|
|
9
|
+
tnfr-3.0.0.dist-info/licenses/LICENSE.txt,sha256=xTjBNhy3N8pomFljrCkD1d34SmAEWv8hyJMMOjNMH0M,1071
|
|
10
|
+
tnfr-3.0.0.dist-info/METADATA,sha256=RP4ob4z-WMs8TeNV58to9266xivZh3gq5kHYsJZ--G8,1325
|
|
11
|
+
tnfr-3.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
+
tnfr-3.0.0.dist-info/top_level.txt,sha256=Q2HJnvc5Rt2VHwVvyBTnNPT4SfmJWnCj7XUxxEvQa7c,5
|
|
13
|
+
tnfr-3.0.0.dist-info/RECORD,,
|
tnfr-2.0.1.dist-info/RECORD
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
tnfr/__init__.py,sha256=o0EN91tVau9YxuN7W17xk4KD7M7wtk6PVwuTcMw8Cbk,1601
|
|
2
|
-
tnfr/constants.py,sha256=_775sPHussR9vgkWRCLC6dzwgk_1_lLnSlWT8sBWR3U,7677
|
|
3
|
-
tnfr/dynamics.py,sha256=7B38c9SVKLVFBrKHeJ1nXbghoRHfDs8Nl9CqUmCcAyI,23260
|
|
4
|
-
tnfr/helpers.py,sha256=tZJsDXc8k9HIfg8BA9cVUEFKBoX1Rfnuhurl2Fvxsy0,6017
|
|
5
|
-
tnfr/main.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
tnfr/observers.py,sha256=MoC-xLJuMP-UYj8cpIVlgSbXDsE1Uj70Zy51PSH3AJY,5192
|
|
7
|
-
tnfr/ontosim.py,sha256=U0IeNVF8rFNhnmWWux91xDc0djTDZQkqRRosP6Z7FmE,5485
|
|
8
|
-
tnfr/operators.py,sha256=M6ahJL8IuB2y4qiEalge5EufCz0eEbhw-O4xfh3NpwE,12146
|
|
9
|
-
tnfr-2.0.1.dist-info/licenses/LICENSE.txt,sha256=xTjBNhy3N8pomFljrCkD1d34SmAEWv8hyJMMOjNMH0M,1071
|
|
10
|
-
tnfr-2.0.1.dist-info/METADATA,sha256=PbHEXhc_39gusakjfFSN_ky5ODSV_UPaSeW32KFlFbY,831
|
|
11
|
-
tnfr-2.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
-
tnfr-2.0.1.dist-info/entry_points.txt,sha256=ybvBewhP43jPrDialnQ7XkhpK5LXotzJXIRFyeXmxZo,44
|
|
13
|
-
tnfr-2.0.1.dist-info/top_level.txt,sha256=Q2HJnvc5Rt2VHwVvyBTnNPT4SfmJWnCj7XUxxEvQa7c,5
|
|
14
|
-
tnfr-2.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|