tnfr 4.5.0__tar.gz → 4.5.1__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.
Potentially problematic release.
This version of tnfr might be problematic. Click here for more details.
- tnfr-4.5.1/PKG-INFO +221 -0
- tnfr-4.5.1/README.md +194 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/pyproject.toml +3 -2
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/__init__.py +2 -1
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/observers.py +9 -1
- tnfr-4.5.1/src/tnfr.egg-info/PKG-INFO +221 -0
- tnfr-4.5.0/PKG-INFO +0 -109
- tnfr-4.5.0/README.md +0 -82
- tnfr-4.5.0/src/tnfr.egg-info/PKG-INFO +0 -109
- {tnfr-4.5.0 → tnfr-4.5.1}/LICENSE.md +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/setup.cfg +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/cli.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/config.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/constants.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/dynamics.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/gamma.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/grammar.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/helpers.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/main.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/metrics.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/node.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/ontosim.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/operators.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/presets.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/program.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/scenarios.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/sense.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/structural.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/trace.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/types.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr/validators.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr.egg-info/SOURCES.txt +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr.egg-info/dependency_links.txt +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr.egg-info/entry_points.txt +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr.egg-info/requires.txt +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/src/tnfr.egg-info/top_level.txt +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_canon.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_cli_sanity.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_edge_cases.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_gamma.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_grammar.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_history.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_history_series.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_integrators.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_invariants.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_nav.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_program.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_remesh.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_remesh_community.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_structural.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_validators.py +0 -0
- {tnfr-4.5.0 → tnfr-4.5.1}/tests/test_vf_coherencia.py +0 -0
tnfr-4.5.1/PKG-INFO
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tnfr
|
|
3
|
+
Version: 4.5.1
|
|
4
|
+
Summary: modular structural-based dynamics on networks
|
|
5
|
+
Author: fmg
|
|
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,resonant fractal,resonance,glyphs,networkx,dynamics,coherence,EPI,Kuramoto
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
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
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE.md
|
|
25
|
+
Requires-Dist: networkx>=2.6
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# tnfr · Python package
|
|
29
|
+
|
|
30
|
+
> Engine for **modeling, simulation, and measurement** of multiscale structural coherence through **structural operators** (emission, reception, coherence, dissonance, coupling, resonance, silence, expansion, contraction, self‑organization, mutation, transition, recursivity).
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## What is `tnfr`?
|
|
35
|
+
|
|
36
|
+
`tnfr` is a Python library to **operate with form**: build nodes, couple them into networks, and **modulate their coherence** over time using structural operators. It does not describe “things”; it **activates processes**. Its theoretical basis is the Resonant Fractal Nature Theory (TNFR), which understands reality as **networks of coherence** that persist because they **resonate**.
|
|
37
|
+
|
|
38
|
+
In practical terms, `tnfr` lets you:
|
|
39
|
+
|
|
40
|
+
* Model **Resonant Fractal Nodes (NFR)** with parameters for **frequency** (νf), **phase** (θ), and **form** (EPI).
|
|
41
|
+
* Apply **structural operators** to start, stabilize, propagate, or reconfigure coherence.
|
|
42
|
+
* **Simulate** nodal dynamics with discrete/continuous integrators.
|
|
43
|
+
* **Measure** global coherence C(t), nodal gradient ΔNFR, and the **Sense Index** (Si).
|
|
44
|
+
* **Visualize** states and trajectories (coupling matrices, C(t) curves, graphs).
|
|
45
|
+
|
|
46
|
+
> **Nodal equation (operational core)**
|
|
47
|
+
>
|
|
48
|
+
> $\frac{\partial \mathrm{EPI}}{\partial t} = \nu_f\,\cdot\,\Delta\mathrm{NFR}(t)$
|
|
49
|
+
>
|
|
50
|
+
> A form emerges and persists when **internal reorganization** (ΔNFR) **resonates** with the node’s **frequency** (νf).
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Installation
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install tnfr
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Requires **Python ≥ 3.9**.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Why TNFR (in 60 seconds)
|
|
65
|
+
|
|
66
|
+
* **From objects to coherences:** you model **processes** that hold, not fixed entities.
|
|
67
|
+
* **Operators instead of rules:** you compose **structural operators** (e.g., *emission*, *coherence*, *dissonance*) to **build trajectories**.
|
|
68
|
+
* **Operational fractality:** the same pattern works for **ideas, teams, tissues, narratives**; the scales change, **the logic doesn’t**.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Getting started (minimal recipe)
|
|
73
|
+
|
|
74
|
+
> *The high‑level API centers on three things: nodes, operators, simulation.*
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
# 1) Nodes and network
|
|
78
|
+
import tnfr as T
|
|
79
|
+
|
|
80
|
+
# A minimal set of nodes with initial frequency (νf)
|
|
81
|
+
A = T.Node(label="seed", nu_f=0.8)
|
|
82
|
+
B = T.Node(label="context", nu_f=0.6)
|
|
83
|
+
net = T.Network([A, B], edges=[(A, B, 0.7)]) # coupling 0..1
|
|
84
|
+
|
|
85
|
+
# 2) Sequence of structural operators
|
|
86
|
+
ops = [
|
|
87
|
+
T.ops.Emission(strength=0.4), # start pattern
|
|
88
|
+
T.ops.Coupling(weight=0.7), # synchronize nodes
|
|
89
|
+
T.ops.Coherence(), # stabilize form
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
# 3) Simulation and metrics
|
|
93
|
+
traj = T.sim.run(net, ops, steps=200, dt=0.05)
|
|
94
|
+
print("C(t) =", T.metrics.coherence(traj)[-1])
|
|
95
|
+
print("Si =", T.metrics.sense_index(traj))
|
|
96
|
+
|
|
97
|
+
# 4) Quick visualization
|
|
98
|
+
T.viz.plot_coherence(traj) # C(t) curve
|
|
99
|
+
T.viz.plot_network(net) # graph/couplings
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
> **Note:** Specific class/function names may vary across minor versions. Check `help(T.ops)` and `help(T.sim)` for your installed API.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Key concepts (operational summary)
|
|
107
|
+
|
|
108
|
+
* **Node (NFR):** a unit that persists because it **resonates**. Parameterized by **νf** (frequency), **θ** (phase), and **EPI** (coherent form).
|
|
109
|
+
* **Structural operators:** functions that reorganize the network. We use **functional** names (not phonemes):
|
|
110
|
+
|
|
111
|
+
* **Emission** (start), **Reception** (open), **Coherence** (stabilize), **Dissonance** (creative tension), **Coupling** (synchrony), **Resonance** (propagate), **Silence** (latency), **Expansion**, **Contraction**, **Self‑organization**, **Mutation**, **Transition**, **Recursivity**.
|
|
112
|
+
* **Magnitudes:**
|
|
113
|
+
|
|
114
|
+
* **C(t):** global coherence.
|
|
115
|
+
* **ΔNFR:** nodal gradient (need for reorganization).
|
|
116
|
+
* **νf:** structural frequency (Hz\_str).
|
|
117
|
+
* **Si:** sense index (ability to generate stable shared coherence).
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Typical workflow
|
|
122
|
+
|
|
123
|
+
1. **Model** your system as a network: nodes (agents, ideas, tissues, modules) and couplings.
|
|
124
|
+
2. **Select** a **trajectory of operators** aligned with your goal (e.g., *start → couple → stabilize*).
|
|
125
|
+
3. **Simulate** the dynamics: number of steps, step size, tolerances.
|
|
126
|
+
4. **Measure**: C(t), ΔNFR, Si; identify bifurcations and collapses.
|
|
127
|
+
5. **Iterate** with controlled **dissonance** to open mutations without losing form.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## High‑level API (orientation map)
|
|
132
|
+
|
|
133
|
+
> The typical module layout in `tnfr` is:
|
|
134
|
+
|
|
135
|
+
* `tnfr.core`: `Node`, `Network`, `EPI`, `State`
|
|
136
|
+
* `tnfr.ops`: structural operators (Emission, Reception, Coherence, Dissonance, ...)
|
|
137
|
+
* `tnfr.sim`: integrators (`run`, `step`, `integrate`), dt control and thresholds
|
|
138
|
+
* `tnfr.metrics`: `coherence`, `gradient`, `sense_index`, `phase_sync`
|
|
139
|
+
* `tnfr.viz`: plotting utilities (`plot_coherence`, `plot_network`, `plot_phase`)
|
|
140
|
+
|
|
141
|
+
Usage examples:
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from tnfr import core, ops, sim, metrics
|
|
145
|
+
|
|
146
|
+
net = core.Network.from_edges([
|
|
147
|
+
("n1", "n2", 0.6),
|
|
148
|
+
("n2", "n3", 0.8),
|
|
149
|
+
])
|
|
150
|
+
|
|
151
|
+
sequence = [ops.Emission(0.3), ops.Coupling(0.5), ops.Coherence()]
|
|
152
|
+
traj = sim.run(net, sequence, steps=500)
|
|
153
|
+
|
|
154
|
+
print(metrics.coherence(traj))
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Parametric modeling
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
import tnfr as T
|
|
163
|
+
|
|
164
|
+
net = T.Network.uniform(n=25, nu_f=0.4, coupling=0.3)
|
|
165
|
+
plan = (
|
|
166
|
+
T.ops.Emission(0.2)
|
|
167
|
+
>> T.ops.Expansion(0.4)
|
|
168
|
+
>> T.ops.Coupling(0.6)
|
|
169
|
+
>> T.ops.Coherence()
|
|
170
|
+
)
|
|
171
|
+
traj = T.sim.run(net, plan, steps=800)
|
|
172
|
+
T.viz.plot_phase(traj)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Main metrics
|
|
178
|
+
|
|
179
|
+
* `coherence(traj) → C(t)`: global stability; higher values indicate sustained form.
|
|
180
|
+
* `gradient(state) → ΔNFR`: local demand for reorganization (high = risk of collapse/bifurcation).
|
|
181
|
+
* `sense_index(traj) → Si`: proxy for **structural sense** (capacity to generate shared coherence) combining **νf**, phase, and topology.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Best practices
|
|
186
|
+
|
|
187
|
+
* **Short sequences** and frequent C(t) checks avoid unnecessary collapses.
|
|
188
|
+
* Use **dissonance** as a tool: introduce it to open possibilities, but **seal** with coherence.
|
|
189
|
+
* **Scale first, detail later:** tune coarse couplings before micro‑parameters.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Project status
|
|
194
|
+
|
|
195
|
+
* **pre‑1.0 API**: signatures may be refined; concepts and magnitudes are stable.
|
|
196
|
+
* **Pure‑Python** core with minimal dependencies (optional: `numpy`, `matplotlib`, `networkx`).
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Contributing
|
|
201
|
+
|
|
202
|
+
Suggestions, issues, and PRs are welcome. Guidelines:
|
|
203
|
+
|
|
204
|
+
1. Prioritize **operational clarity** (names, docstrings, examples).
|
|
205
|
+
2. Add **tests** and **notebooks** that show the structural effect of each PR.
|
|
206
|
+
3. Keep **semantic neutrality**: operators act on form, not on contents.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## License
|
|
211
|
+
|
|
212
|
+
MIT
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## References & notes
|
|
217
|
+
|
|
218
|
+
* Theoretical foundations: TNFR operational manual.
|
|
219
|
+
* Operational definitions: nodal equation, dimensions (frequency, phase, form), and structural operators.
|
|
220
|
+
|
|
221
|
+
> If you use `tnfr` in research or projects, please cite the TNFR conceptual framework and link to the PyPI package.
|
tnfr-4.5.1/README.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# tnfr · Python package
|
|
2
|
+
|
|
3
|
+
> Engine for **modeling, simulation, and measurement** of multiscale structural coherence through **structural operators** (emission, reception, coherence, dissonance, coupling, resonance, silence, expansion, contraction, self‑organization, mutation, transition, recursivity).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What is `tnfr`?
|
|
8
|
+
|
|
9
|
+
`tnfr` is a Python library to **operate with form**: build nodes, couple them into networks, and **modulate their coherence** over time using structural operators. It does not describe “things”; it **activates processes**. Its theoretical basis is the Resonant Fractal Nature Theory (TNFR), which understands reality as **networks of coherence** that persist because they **resonate**.
|
|
10
|
+
|
|
11
|
+
In practical terms, `tnfr` lets you:
|
|
12
|
+
|
|
13
|
+
* Model **Resonant Fractal Nodes (NFR)** with parameters for **frequency** (νf), **phase** (θ), and **form** (EPI).
|
|
14
|
+
* Apply **structural operators** to start, stabilize, propagate, or reconfigure coherence.
|
|
15
|
+
* **Simulate** nodal dynamics with discrete/continuous integrators.
|
|
16
|
+
* **Measure** global coherence C(t), nodal gradient ΔNFR, and the **Sense Index** (Si).
|
|
17
|
+
* **Visualize** states and trajectories (coupling matrices, C(t) curves, graphs).
|
|
18
|
+
|
|
19
|
+
> **Nodal equation (operational core)**
|
|
20
|
+
>
|
|
21
|
+
> $\frac{\partial \mathrm{EPI}}{\partial t} = \nu_f\,\cdot\,\Delta\mathrm{NFR}(t)$
|
|
22
|
+
>
|
|
23
|
+
> A form emerges and persists when **internal reorganization** (ΔNFR) **resonates** with the node’s **frequency** (νf).
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install tnfr
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Requires **Python ≥ 3.9**.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Why TNFR (in 60 seconds)
|
|
38
|
+
|
|
39
|
+
* **From objects to coherences:** you model **processes** that hold, not fixed entities.
|
|
40
|
+
* **Operators instead of rules:** you compose **structural operators** (e.g., *emission*, *coherence*, *dissonance*) to **build trajectories**.
|
|
41
|
+
* **Operational fractality:** the same pattern works for **ideas, teams, tissues, narratives**; the scales change, **the logic doesn’t**.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Getting started (minimal recipe)
|
|
46
|
+
|
|
47
|
+
> *The high‑level API centers on three things: nodes, operators, simulation.*
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
# 1) Nodes and network
|
|
51
|
+
import tnfr as T
|
|
52
|
+
|
|
53
|
+
# A minimal set of nodes with initial frequency (νf)
|
|
54
|
+
A = T.Node(label="seed", nu_f=0.8)
|
|
55
|
+
B = T.Node(label="context", nu_f=0.6)
|
|
56
|
+
net = T.Network([A, B], edges=[(A, B, 0.7)]) # coupling 0..1
|
|
57
|
+
|
|
58
|
+
# 2) Sequence of structural operators
|
|
59
|
+
ops = [
|
|
60
|
+
T.ops.Emission(strength=0.4), # start pattern
|
|
61
|
+
T.ops.Coupling(weight=0.7), # synchronize nodes
|
|
62
|
+
T.ops.Coherence(), # stabilize form
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
# 3) Simulation and metrics
|
|
66
|
+
traj = T.sim.run(net, ops, steps=200, dt=0.05)
|
|
67
|
+
print("C(t) =", T.metrics.coherence(traj)[-1])
|
|
68
|
+
print("Si =", T.metrics.sense_index(traj))
|
|
69
|
+
|
|
70
|
+
# 4) Quick visualization
|
|
71
|
+
T.viz.plot_coherence(traj) # C(t) curve
|
|
72
|
+
T.viz.plot_network(net) # graph/couplings
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
> **Note:** Specific class/function names may vary across minor versions. Check `help(T.ops)` and `help(T.sim)` for your installed API.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Key concepts (operational summary)
|
|
80
|
+
|
|
81
|
+
* **Node (NFR):** a unit that persists because it **resonates**. Parameterized by **νf** (frequency), **θ** (phase), and **EPI** (coherent form).
|
|
82
|
+
* **Structural operators:** functions that reorganize the network. We use **functional** names (not phonemes):
|
|
83
|
+
|
|
84
|
+
* **Emission** (start), **Reception** (open), **Coherence** (stabilize), **Dissonance** (creative tension), **Coupling** (synchrony), **Resonance** (propagate), **Silence** (latency), **Expansion**, **Contraction**, **Self‑organization**, **Mutation**, **Transition**, **Recursivity**.
|
|
85
|
+
* **Magnitudes:**
|
|
86
|
+
|
|
87
|
+
* **C(t):** global coherence.
|
|
88
|
+
* **ΔNFR:** nodal gradient (need for reorganization).
|
|
89
|
+
* **νf:** structural frequency (Hz\_str).
|
|
90
|
+
* **Si:** sense index (ability to generate stable shared coherence).
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Typical workflow
|
|
95
|
+
|
|
96
|
+
1. **Model** your system as a network: nodes (agents, ideas, tissues, modules) and couplings.
|
|
97
|
+
2. **Select** a **trajectory of operators** aligned with your goal (e.g., *start → couple → stabilize*).
|
|
98
|
+
3. **Simulate** the dynamics: number of steps, step size, tolerances.
|
|
99
|
+
4. **Measure**: C(t), ΔNFR, Si; identify bifurcations and collapses.
|
|
100
|
+
5. **Iterate** with controlled **dissonance** to open mutations without losing form.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## High‑level API (orientation map)
|
|
105
|
+
|
|
106
|
+
> The typical module layout in `tnfr` is:
|
|
107
|
+
|
|
108
|
+
* `tnfr.core`: `Node`, `Network`, `EPI`, `State`
|
|
109
|
+
* `tnfr.ops`: structural operators (Emission, Reception, Coherence, Dissonance, ...)
|
|
110
|
+
* `tnfr.sim`: integrators (`run`, `step`, `integrate`), dt control and thresholds
|
|
111
|
+
* `tnfr.metrics`: `coherence`, `gradient`, `sense_index`, `phase_sync`
|
|
112
|
+
* `tnfr.viz`: plotting utilities (`plot_coherence`, `plot_network`, `plot_phase`)
|
|
113
|
+
|
|
114
|
+
Usage examples:
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
from tnfr import core, ops, sim, metrics
|
|
118
|
+
|
|
119
|
+
net = core.Network.from_edges([
|
|
120
|
+
("n1", "n2", 0.6),
|
|
121
|
+
("n2", "n3", 0.8),
|
|
122
|
+
])
|
|
123
|
+
|
|
124
|
+
sequence = [ops.Emission(0.3), ops.Coupling(0.5), ops.Coherence()]
|
|
125
|
+
traj = sim.run(net, sequence, steps=500)
|
|
126
|
+
|
|
127
|
+
print(metrics.coherence(traj))
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Parametric modeling
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
import tnfr as T
|
|
136
|
+
|
|
137
|
+
net = T.Network.uniform(n=25, nu_f=0.4, coupling=0.3)
|
|
138
|
+
plan = (
|
|
139
|
+
T.ops.Emission(0.2)
|
|
140
|
+
>> T.ops.Expansion(0.4)
|
|
141
|
+
>> T.ops.Coupling(0.6)
|
|
142
|
+
>> T.ops.Coherence()
|
|
143
|
+
)
|
|
144
|
+
traj = T.sim.run(net, plan, steps=800)
|
|
145
|
+
T.viz.plot_phase(traj)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Main metrics
|
|
151
|
+
|
|
152
|
+
* `coherence(traj) → C(t)`: global stability; higher values indicate sustained form.
|
|
153
|
+
* `gradient(state) → ΔNFR`: local demand for reorganization (high = risk of collapse/bifurcation).
|
|
154
|
+
* `sense_index(traj) → Si`: proxy for **structural sense** (capacity to generate shared coherence) combining **νf**, phase, and topology.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Best practices
|
|
159
|
+
|
|
160
|
+
* **Short sequences** and frequent C(t) checks avoid unnecessary collapses.
|
|
161
|
+
* Use **dissonance** as a tool: introduce it to open possibilities, but **seal** with coherence.
|
|
162
|
+
* **Scale first, detail later:** tune coarse couplings before micro‑parameters.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Project status
|
|
167
|
+
|
|
168
|
+
* **pre‑1.0 API**: signatures may be refined; concepts and magnitudes are stable.
|
|
169
|
+
* **Pure‑Python** core with minimal dependencies (optional: `numpy`, `matplotlib`, `networkx`).
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Contributing
|
|
174
|
+
|
|
175
|
+
Suggestions, issues, and PRs are welcome. Guidelines:
|
|
176
|
+
|
|
177
|
+
1. Prioritize **operational clarity** (names, docstrings, examples).
|
|
178
|
+
2. Add **tests** and **notebooks** that show the structural effect of each PR.
|
|
179
|
+
3. Keep **semantic neutrality**: operators act on form, not on contents.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## License
|
|
184
|
+
|
|
185
|
+
MIT
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## References & notes
|
|
190
|
+
|
|
191
|
+
* Theoretical foundations: TNFR operational manual.
|
|
192
|
+
* Operational definitions: nodal equation, dimensions (frequency, phase, form), and structural operators.
|
|
193
|
+
|
|
194
|
+
> If you use `tnfr` in research or projects, please cite the TNFR conceptual framework and link to the PyPI package.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "tnfr"
|
|
3
|
-
version = "4.5.
|
|
4
|
-
description = "
|
|
3
|
+
version = "4.5.1"
|
|
4
|
+
description = "modular structural-based dynamics on networks"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.9"
|
|
7
7
|
license = { text = "MIT" }
|
|
@@ -40,3 +40,4 @@ build-backend = "setuptools.build_meta"
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
|
|
@@ -101,9 +101,17 @@ def carga_glifica(G, window: int | None = None) -> dict:
|
|
|
101
101
|
# Proporciones por glifo
|
|
102
102
|
dist = {k: v / count for k, v in total.items()}
|
|
103
103
|
|
|
104
|
-
|
|
105
104
|
# Agregados conceptuales (puedes ajustar categorías)
|
|
105
|
+
# Glifos que consolidan la coherencia nodal: I’L estabiliza el flujo (cap. 6),
|
|
106
|
+
# R’A propaga la resonancia (cap. 9), U’M acopla nodos en fase (cap. 8)
|
|
107
|
+
# y SH’A ofrece silencio regenerativo (cap. 10). Véase manual TNFR,
|
|
108
|
+
# sec. 18.19 "Análisis morfosintáctico" para la taxonomía funcional.
|
|
106
109
|
estabilizadores = ["I’L", "R’A", "U’M", "SH’A"]
|
|
110
|
+
|
|
111
|
+
# Glifos que perturban o reconfiguran la red: O’Z introduce disonancia
|
|
112
|
+
# evolutiva (cap. 7), Z’HIR muta la estructura (cap. 14), NA’V marca
|
|
113
|
+
# el tránsito entre estados (cap. 15) y T’HOL autoorganiza un nuevo
|
|
114
|
+
# orden (cap. 13). Véase manual TNFR, sec. 18.19 para esta clasificación.
|
|
107
115
|
disruptivos = ["O’Z", "Z’HIR", "NA’V", "T’HOL"]
|
|
108
116
|
|
|
109
117
|
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tnfr
|
|
3
|
+
Version: 4.5.1
|
|
4
|
+
Summary: modular structural-based dynamics on networks
|
|
5
|
+
Author: fmg
|
|
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,resonant fractal,resonance,glyphs,networkx,dynamics,coherence,EPI,Kuramoto
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
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
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE.md
|
|
25
|
+
Requires-Dist: networkx>=2.6
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# tnfr · Python package
|
|
29
|
+
|
|
30
|
+
> Engine for **modeling, simulation, and measurement** of multiscale structural coherence through **structural operators** (emission, reception, coherence, dissonance, coupling, resonance, silence, expansion, contraction, self‑organization, mutation, transition, recursivity).
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## What is `tnfr`?
|
|
35
|
+
|
|
36
|
+
`tnfr` is a Python library to **operate with form**: build nodes, couple them into networks, and **modulate their coherence** over time using structural operators. It does not describe “things”; it **activates processes**. Its theoretical basis is the Resonant Fractal Nature Theory (TNFR), which understands reality as **networks of coherence** that persist because they **resonate**.
|
|
37
|
+
|
|
38
|
+
In practical terms, `tnfr` lets you:
|
|
39
|
+
|
|
40
|
+
* Model **Resonant Fractal Nodes (NFR)** with parameters for **frequency** (νf), **phase** (θ), and **form** (EPI).
|
|
41
|
+
* Apply **structural operators** to start, stabilize, propagate, or reconfigure coherence.
|
|
42
|
+
* **Simulate** nodal dynamics with discrete/continuous integrators.
|
|
43
|
+
* **Measure** global coherence C(t), nodal gradient ΔNFR, and the **Sense Index** (Si).
|
|
44
|
+
* **Visualize** states and trajectories (coupling matrices, C(t) curves, graphs).
|
|
45
|
+
|
|
46
|
+
> **Nodal equation (operational core)**
|
|
47
|
+
>
|
|
48
|
+
> $\frac{\partial \mathrm{EPI}}{\partial t} = \nu_f\,\cdot\,\Delta\mathrm{NFR}(t)$
|
|
49
|
+
>
|
|
50
|
+
> A form emerges and persists when **internal reorganization** (ΔNFR) **resonates** with the node’s **frequency** (νf).
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Installation
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install tnfr
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Requires **Python ≥ 3.9**.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Why TNFR (in 60 seconds)
|
|
65
|
+
|
|
66
|
+
* **From objects to coherences:** you model **processes** that hold, not fixed entities.
|
|
67
|
+
* **Operators instead of rules:** you compose **structural operators** (e.g., *emission*, *coherence*, *dissonance*) to **build trajectories**.
|
|
68
|
+
* **Operational fractality:** the same pattern works for **ideas, teams, tissues, narratives**; the scales change, **the logic doesn’t**.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Getting started (minimal recipe)
|
|
73
|
+
|
|
74
|
+
> *The high‑level API centers on three things: nodes, operators, simulation.*
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
# 1) Nodes and network
|
|
78
|
+
import tnfr as T
|
|
79
|
+
|
|
80
|
+
# A minimal set of nodes with initial frequency (νf)
|
|
81
|
+
A = T.Node(label="seed", nu_f=0.8)
|
|
82
|
+
B = T.Node(label="context", nu_f=0.6)
|
|
83
|
+
net = T.Network([A, B], edges=[(A, B, 0.7)]) # coupling 0..1
|
|
84
|
+
|
|
85
|
+
# 2) Sequence of structural operators
|
|
86
|
+
ops = [
|
|
87
|
+
T.ops.Emission(strength=0.4), # start pattern
|
|
88
|
+
T.ops.Coupling(weight=0.7), # synchronize nodes
|
|
89
|
+
T.ops.Coherence(), # stabilize form
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
# 3) Simulation and metrics
|
|
93
|
+
traj = T.sim.run(net, ops, steps=200, dt=0.05)
|
|
94
|
+
print("C(t) =", T.metrics.coherence(traj)[-1])
|
|
95
|
+
print("Si =", T.metrics.sense_index(traj))
|
|
96
|
+
|
|
97
|
+
# 4) Quick visualization
|
|
98
|
+
T.viz.plot_coherence(traj) # C(t) curve
|
|
99
|
+
T.viz.plot_network(net) # graph/couplings
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
> **Note:** Specific class/function names may vary across minor versions. Check `help(T.ops)` and `help(T.sim)` for your installed API.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Key concepts (operational summary)
|
|
107
|
+
|
|
108
|
+
* **Node (NFR):** a unit that persists because it **resonates**. Parameterized by **νf** (frequency), **θ** (phase), and **EPI** (coherent form).
|
|
109
|
+
* **Structural operators:** functions that reorganize the network. We use **functional** names (not phonemes):
|
|
110
|
+
|
|
111
|
+
* **Emission** (start), **Reception** (open), **Coherence** (stabilize), **Dissonance** (creative tension), **Coupling** (synchrony), **Resonance** (propagate), **Silence** (latency), **Expansion**, **Contraction**, **Self‑organization**, **Mutation**, **Transition**, **Recursivity**.
|
|
112
|
+
* **Magnitudes:**
|
|
113
|
+
|
|
114
|
+
* **C(t):** global coherence.
|
|
115
|
+
* **ΔNFR:** nodal gradient (need for reorganization).
|
|
116
|
+
* **νf:** structural frequency (Hz\_str).
|
|
117
|
+
* **Si:** sense index (ability to generate stable shared coherence).
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Typical workflow
|
|
122
|
+
|
|
123
|
+
1. **Model** your system as a network: nodes (agents, ideas, tissues, modules) and couplings.
|
|
124
|
+
2. **Select** a **trajectory of operators** aligned with your goal (e.g., *start → couple → stabilize*).
|
|
125
|
+
3. **Simulate** the dynamics: number of steps, step size, tolerances.
|
|
126
|
+
4. **Measure**: C(t), ΔNFR, Si; identify bifurcations and collapses.
|
|
127
|
+
5. **Iterate** with controlled **dissonance** to open mutations without losing form.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## High‑level API (orientation map)
|
|
132
|
+
|
|
133
|
+
> The typical module layout in `tnfr` is:
|
|
134
|
+
|
|
135
|
+
* `tnfr.core`: `Node`, `Network`, `EPI`, `State`
|
|
136
|
+
* `tnfr.ops`: structural operators (Emission, Reception, Coherence, Dissonance, ...)
|
|
137
|
+
* `tnfr.sim`: integrators (`run`, `step`, `integrate`), dt control and thresholds
|
|
138
|
+
* `tnfr.metrics`: `coherence`, `gradient`, `sense_index`, `phase_sync`
|
|
139
|
+
* `tnfr.viz`: plotting utilities (`plot_coherence`, `plot_network`, `plot_phase`)
|
|
140
|
+
|
|
141
|
+
Usage examples:
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from tnfr import core, ops, sim, metrics
|
|
145
|
+
|
|
146
|
+
net = core.Network.from_edges([
|
|
147
|
+
("n1", "n2", 0.6),
|
|
148
|
+
("n2", "n3", 0.8),
|
|
149
|
+
])
|
|
150
|
+
|
|
151
|
+
sequence = [ops.Emission(0.3), ops.Coupling(0.5), ops.Coherence()]
|
|
152
|
+
traj = sim.run(net, sequence, steps=500)
|
|
153
|
+
|
|
154
|
+
print(metrics.coherence(traj))
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Parametric modeling
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
import tnfr as T
|
|
163
|
+
|
|
164
|
+
net = T.Network.uniform(n=25, nu_f=0.4, coupling=0.3)
|
|
165
|
+
plan = (
|
|
166
|
+
T.ops.Emission(0.2)
|
|
167
|
+
>> T.ops.Expansion(0.4)
|
|
168
|
+
>> T.ops.Coupling(0.6)
|
|
169
|
+
>> T.ops.Coherence()
|
|
170
|
+
)
|
|
171
|
+
traj = T.sim.run(net, plan, steps=800)
|
|
172
|
+
T.viz.plot_phase(traj)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Main metrics
|
|
178
|
+
|
|
179
|
+
* `coherence(traj) → C(t)`: global stability; higher values indicate sustained form.
|
|
180
|
+
* `gradient(state) → ΔNFR`: local demand for reorganization (high = risk of collapse/bifurcation).
|
|
181
|
+
* `sense_index(traj) → Si`: proxy for **structural sense** (capacity to generate shared coherence) combining **νf**, phase, and topology.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Best practices
|
|
186
|
+
|
|
187
|
+
* **Short sequences** and frequent C(t) checks avoid unnecessary collapses.
|
|
188
|
+
* Use **dissonance** as a tool: introduce it to open possibilities, but **seal** with coherence.
|
|
189
|
+
* **Scale first, detail later:** tune coarse couplings before micro‑parameters.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Project status
|
|
194
|
+
|
|
195
|
+
* **pre‑1.0 API**: signatures may be refined; concepts and magnitudes are stable.
|
|
196
|
+
* **Pure‑Python** core with minimal dependencies (optional: `numpy`, `matplotlib`, `networkx`).
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Contributing
|
|
201
|
+
|
|
202
|
+
Suggestions, issues, and PRs are welcome. Guidelines:
|
|
203
|
+
|
|
204
|
+
1. Prioritize **operational clarity** (names, docstrings, examples).
|
|
205
|
+
2. Add **tests** and **notebooks** that show the structural effect of each PR.
|
|
206
|
+
3. Keep **semantic neutrality**: operators act on form, not on contents.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## License
|
|
211
|
+
|
|
212
|
+
MIT
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## References & notes
|
|
217
|
+
|
|
218
|
+
* Theoretical foundations: TNFR operational manual.
|
|
219
|
+
* Operational definitions: nodal equation, dimensions (frequency, phase, form), and structural operators.
|
|
220
|
+
|
|
221
|
+
> If you use `tnfr` in research or projects, please cite the TNFR conceptual framework and link to the PyPI package.
|
tnfr-4.5.0/PKG-INFO
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: tnfr
|
|
3
|
-
Version: 4.5.0
|
|
4
|
-
Summary: Canonical TNFR: modular glyph-based dynamics on networks.
|
|
5
|
-
Author: fmg
|
|
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,resonant fractal,resonance,glyphs,networkx,dynamics,coherence,EPI,Kuramoto
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
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
|
|
22
|
-
Requires-Python: >=3.9
|
|
23
|
-
Description-Content-Type: text/markdown
|
|
24
|
-
License-File: LICENSE.md
|
|
25
|
-
Requires-Dist: networkx>=2.6
|
|
26
|
-
Dynamic: license-file
|
|
27
|
-
|
|
28
|
-
# TNFR Python Project
|
|
29
|
-
|
|
30
|
-
Reference implementation of the Resonant Fractal Nature Theory (TNFR).
|
|
31
|
-
It models glyph-driven dynamics on NetworkX graphs, providing a modular
|
|
32
|
-
engine to simulate coherent reorganization processes.
|
|
33
|
-
|
|
34
|
-
## General Project Structure
|
|
35
|
-
|
|
36
|
-
* **Package entry point.** `__init__.py` registers modules under short names to avoid circular imports and exposes the public API: `preparar_red`, `step`, `run`, and observation utilities.
|
|
37
|
-
|
|
38
|
-
* **Configuration & constants.** `constants.py` centralizes default parameters (discretization, EPI and νf ranges, mixing weights, re-mesh limits, etc.) and provides utilities to inject them into the network (`attach_defaults`, `merge_overrides`), along with standardized aliases for node attributes.
|
|
39
|
-
|
|
40
|
-
* **Cross-cutting utilities.** `helpers.py` offers core numeric helpers, alias-based attribute accessors, neighborhood statistics, glyph history, a callback system, and computation of the sense index `Si` for each node.
|
|
41
|
-
|
|
42
|
-
* **Dynamics engine.** `dynamics.py` implements the simulation loop: ΔNFR field computation, nodal equation integration, glyph selection/application, clamps, phase coordination, history updates, and conditional re-mesh (`step` and `run`).
|
|
43
|
-
|
|
44
|
-
* **Glyph operators.** `operators.py` defines the 13 glyphs as local transformations, a dispatcher `aplicar_glifo`, and both direct and stability-conditioned re-mesh utilities.
|
|
45
|
-
|
|
46
|
-
* **Observers & metrics.** `observers.py` registers standard callbacks and computes global coherence, phase synchrony, Kuramoto order, glyph distribution, and the sense vector `Σ⃗`, among others.
|
|
47
|
-
|
|
48
|
-
* **Simulation orchestration.** `ontosim.py` prepares a NetworkX graph, attaches configuration, and initializes attributes (EPI, phases, frequencies) before delegating dynamics to `dynamics.step`/`run`.
|
|
49
|
-
|
|
50
|
-
* **Demo CLI.** `main.py` generates an Erdős–Rényi network, lets you tweak basic parameters, and runs the simulation while displaying final metrics.
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Key Concepts to Grasp
|
|
55
|
-
|
|
56
|
-
* **Aliased dependency tree.** Modules import each other via global aliases to simplify access and prevent cycles—essential for navigating the code unambiguously.
|
|
57
|
-
|
|
58
|
-
* **Normalized node attributes.** All data (EPI, phase `θ`, frequency `νf`, `ΔNFR`, etc.) live in `G.nodes[n]` under compatible alias names, making extensions and custom hooks straightforward.
|
|
59
|
-
|
|
60
|
-
* **Sense Index (`Si`).** Combines normalized frequency, phase dispersion, and field magnitude to evaluate each node’s “sense,” influencing glyph selection.
|
|
61
|
-
|
|
62
|
-
* **Step-wise engine.** `dynamics.step` orchestrates eight phases: field computation, `Si`, glyph selection & application, integration, clamps, phase coordination, history update, and conditioned re-mesh.
|
|
63
|
-
|
|
64
|
-
* **Glyphs as operators.** Each glyph applies a smooth transformation to node attributes (emission, diffusion, coupling, dissonance, etc.), dispatched by a configurable, typographic name.
|
|
65
|
-
|
|
66
|
-
* **Network re-mesh.** Mixes the current state with a past one (memory `τ`) to stabilize the network, with clear precedence for `α` and conditions based on recent stability and synchrony history.
|
|
67
|
-
|
|
68
|
-
* **Γ(R) coupling.** Optional network term added to the nodal equation, parameterized by global phase order `R` with gain `β` and threshold `R0` (see `DEFAULTS["GAMMA"]`).
|
|
69
|
-
|
|
70
|
-
* **Callbacks & observers.** The `Γ(R)` system lets you hook functions before/after each step and after re-mesh, enabling monitoring or external intervention.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Recommendations for Going Deeper
|
|
75
|
-
|
|
76
|
-
* **NetworkX & the Graph API.** Get comfortable with how NetworkX handles attributes and topology; all dynamics operate on `Graph` objects and their properties.
|
|
77
|
-
|
|
78
|
-
* **Extending the ΔNFR field.** Explore `set_delta_nfr_hook` to implement alternative nodal fields and learn how metadata and mixing weights are recorded.
|
|
79
|
-
|
|
80
|
-
* **Designing new glyphs.** Review `operators.py` to add operators or adjust factors in `DEFAULTS['GLYPH_FACTORS']`.
|
|
81
|
-
|
|
82
|
-
* **Custom observers.** Implement your own metrics via `register_callback` or by extending `observers.py` to measure phenomena specific to your study.
|
|
83
|
-
|
|
84
|
-
* **Theoretical reading.** For conceptual background, see the included PDFs (`TNFR.pdf`, *El Pulso que nos Atraviesa*), which deepen the fractal-resonant framework.
|
|
85
|
-
|
|
86
|
-
* **Advanced parameters.** Experiment with adaptive phase coordination, stability criteria, and the glyph grammar to observe their impact on network self-organization.
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
**Mastering these pieces will let you extend the simulation, build analysis pipelines and connect the theory with computational applications.**
|
|
91
|
-
|
|
92
|
-
## Optional Node environment
|
|
93
|
-
The repository includes a minimal `package.json` and `netlify.toml` used for an experimental Remix web demo. They are not required for the core Python package; feel free to ignore them unless you plan to build the demo via `npm run build`.
|
|
94
|
-
|
|
95
|
-
## Testing
|
|
96
|
-
|
|
97
|
-
Install the dependencies and project in editable mode before running the test suite with `pytest`:
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
pip install networkx
|
|
101
|
-
pip install -e .
|
|
102
|
-
pytest
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Installation
|
|
107
|
-
```
|
|
108
|
-
pip install tnfr
|
|
109
|
-
```
|
tnfr-4.5.0/README.md
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# TNFR Python Project
|
|
2
|
-
|
|
3
|
-
Reference implementation of the Resonant Fractal Nature Theory (TNFR).
|
|
4
|
-
It models glyph-driven dynamics on NetworkX graphs, providing a modular
|
|
5
|
-
engine to simulate coherent reorganization processes.
|
|
6
|
-
|
|
7
|
-
## General Project Structure
|
|
8
|
-
|
|
9
|
-
* **Package entry point.** `__init__.py` registers modules under short names to avoid circular imports and exposes the public API: `preparar_red`, `step`, `run`, and observation utilities.
|
|
10
|
-
|
|
11
|
-
* **Configuration & constants.** `constants.py` centralizes default parameters (discretization, EPI and νf ranges, mixing weights, re-mesh limits, etc.) and provides utilities to inject them into the network (`attach_defaults`, `merge_overrides`), along with standardized aliases for node attributes.
|
|
12
|
-
|
|
13
|
-
* **Cross-cutting utilities.** `helpers.py` offers core numeric helpers, alias-based attribute accessors, neighborhood statistics, glyph history, a callback system, and computation of the sense index `Si` for each node.
|
|
14
|
-
|
|
15
|
-
* **Dynamics engine.** `dynamics.py` implements the simulation loop: ΔNFR field computation, nodal equation integration, glyph selection/application, clamps, phase coordination, history updates, and conditional re-mesh (`step` and `run`).
|
|
16
|
-
|
|
17
|
-
* **Glyph operators.** `operators.py` defines the 13 glyphs as local transformations, a dispatcher `aplicar_glifo`, and both direct and stability-conditioned re-mesh utilities.
|
|
18
|
-
|
|
19
|
-
* **Observers & metrics.** `observers.py` registers standard callbacks and computes global coherence, phase synchrony, Kuramoto order, glyph distribution, and the sense vector `Σ⃗`, among others.
|
|
20
|
-
|
|
21
|
-
* **Simulation orchestration.** `ontosim.py` prepares a NetworkX graph, attaches configuration, and initializes attributes (EPI, phases, frequencies) before delegating dynamics to `dynamics.step`/`run`.
|
|
22
|
-
|
|
23
|
-
* **Demo CLI.** `main.py` generates an Erdős–Rényi network, lets you tweak basic parameters, and runs the simulation while displaying final metrics.
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Key Concepts to Grasp
|
|
28
|
-
|
|
29
|
-
* **Aliased dependency tree.** Modules import each other via global aliases to simplify access and prevent cycles—essential for navigating the code unambiguously.
|
|
30
|
-
|
|
31
|
-
* **Normalized node attributes.** All data (EPI, phase `θ`, frequency `νf`, `ΔNFR`, etc.) live in `G.nodes[n]` under compatible alias names, making extensions and custom hooks straightforward.
|
|
32
|
-
|
|
33
|
-
* **Sense Index (`Si`).** Combines normalized frequency, phase dispersion, and field magnitude to evaluate each node’s “sense,” influencing glyph selection.
|
|
34
|
-
|
|
35
|
-
* **Step-wise engine.** `dynamics.step` orchestrates eight phases: field computation, `Si`, glyph selection & application, integration, clamps, phase coordination, history update, and conditioned re-mesh.
|
|
36
|
-
|
|
37
|
-
* **Glyphs as operators.** Each glyph applies a smooth transformation to node attributes (emission, diffusion, coupling, dissonance, etc.), dispatched by a configurable, typographic name.
|
|
38
|
-
|
|
39
|
-
* **Network re-mesh.** Mixes the current state with a past one (memory `τ`) to stabilize the network, with clear precedence for `α` and conditions based on recent stability and synchrony history.
|
|
40
|
-
|
|
41
|
-
* **Γ(R) coupling.** Optional network term added to the nodal equation, parameterized by global phase order `R` with gain `β` and threshold `R0` (see `DEFAULTS["GAMMA"]`).
|
|
42
|
-
|
|
43
|
-
* **Callbacks & observers.** The `Γ(R)` system lets you hook functions before/after each step and after re-mesh, enabling monitoring or external intervention.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Recommendations for Going Deeper
|
|
48
|
-
|
|
49
|
-
* **NetworkX & the Graph API.** Get comfortable with how NetworkX handles attributes and topology; all dynamics operate on `Graph` objects and their properties.
|
|
50
|
-
|
|
51
|
-
* **Extending the ΔNFR field.** Explore `set_delta_nfr_hook` to implement alternative nodal fields and learn how metadata and mixing weights are recorded.
|
|
52
|
-
|
|
53
|
-
* **Designing new glyphs.** Review `operators.py` to add operators or adjust factors in `DEFAULTS['GLYPH_FACTORS']`.
|
|
54
|
-
|
|
55
|
-
* **Custom observers.** Implement your own metrics via `register_callback` or by extending `observers.py` to measure phenomena specific to your study.
|
|
56
|
-
|
|
57
|
-
* **Theoretical reading.** For conceptual background, see the included PDFs (`TNFR.pdf`, *El Pulso que nos Atraviesa*), which deepen the fractal-resonant framework.
|
|
58
|
-
|
|
59
|
-
* **Advanced parameters.** Experiment with adaptive phase coordination, stability criteria, and the glyph grammar to observe their impact on network self-organization.
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
**Mastering these pieces will let you extend the simulation, build analysis pipelines and connect the theory with computational applications.**
|
|
64
|
-
|
|
65
|
-
## Optional Node environment
|
|
66
|
-
The repository includes a minimal `package.json` and `netlify.toml` used for an experimental Remix web demo. They are not required for the core Python package; feel free to ignore them unless you plan to build the demo via `npm run build`.
|
|
67
|
-
|
|
68
|
-
## Testing
|
|
69
|
-
|
|
70
|
-
Install the dependencies and project in editable mode before running the test suite with `pytest`:
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
pip install networkx
|
|
74
|
-
pip install -e .
|
|
75
|
-
pytest
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Installation
|
|
80
|
-
```
|
|
81
|
-
pip install tnfr
|
|
82
|
-
```
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: tnfr
|
|
3
|
-
Version: 4.5.0
|
|
4
|
-
Summary: Canonical TNFR: modular glyph-based dynamics on networks.
|
|
5
|
-
Author: fmg
|
|
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,resonant fractal,resonance,glyphs,networkx,dynamics,coherence,EPI,Kuramoto
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
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
|
|
22
|
-
Requires-Python: >=3.9
|
|
23
|
-
Description-Content-Type: text/markdown
|
|
24
|
-
License-File: LICENSE.md
|
|
25
|
-
Requires-Dist: networkx>=2.6
|
|
26
|
-
Dynamic: license-file
|
|
27
|
-
|
|
28
|
-
# TNFR Python Project
|
|
29
|
-
|
|
30
|
-
Reference implementation of the Resonant Fractal Nature Theory (TNFR).
|
|
31
|
-
It models glyph-driven dynamics on NetworkX graphs, providing a modular
|
|
32
|
-
engine to simulate coherent reorganization processes.
|
|
33
|
-
|
|
34
|
-
## General Project Structure
|
|
35
|
-
|
|
36
|
-
* **Package entry point.** `__init__.py` registers modules under short names to avoid circular imports and exposes the public API: `preparar_red`, `step`, `run`, and observation utilities.
|
|
37
|
-
|
|
38
|
-
* **Configuration & constants.** `constants.py` centralizes default parameters (discretization, EPI and νf ranges, mixing weights, re-mesh limits, etc.) and provides utilities to inject them into the network (`attach_defaults`, `merge_overrides`), along with standardized aliases for node attributes.
|
|
39
|
-
|
|
40
|
-
* **Cross-cutting utilities.** `helpers.py` offers core numeric helpers, alias-based attribute accessors, neighborhood statistics, glyph history, a callback system, and computation of the sense index `Si` for each node.
|
|
41
|
-
|
|
42
|
-
* **Dynamics engine.** `dynamics.py` implements the simulation loop: ΔNFR field computation, nodal equation integration, glyph selection/application, clamps, phase coordination, history updates, and conditional re-mesh (`step` and `run`).
|
|
43
|
-
|
|
44
|
-
* **Glyph operators.** `operators.py` defines the 13 glyphs as local transformations, a dispatcher `aplicar_glifo`, and both direct and stability-conditioned re-mesh utilities.
|
|
45
|
-
|
|
46
|
-
* **Observers & metrics.** `observers.py` registers standard callbacks and computes global coherence, phase synchrony, Kuramoto order, glyph distribution, and the sense vector `Σ⃗`, among others.
|
|
47
|
-
|
|
48
|
-
* **Simulation orchestration.** `ontosim.py` prepares a NetworkX graph, attaches configuration, and initializes attributes (EPI, phases, frequencies) before delegating dynamics to `dynamics.step`/`run`.
|
|
49
|
-
|
|
50
|
-
* **Demo CLI.** `main.py` generates an Erdős–Rényi network, lets you tweak basic parameters, and runs the simulation while displaying final metrics.
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Key Concepts to Grasp
|
|
55
|
-
|
|
56
|
-
* **Aliased dependency tree.** Modules import each other via global aliases to simplify access and prevent cycles—essential for navigating the code unambiguously.
|
|
57
|
-
|
|
58
|
-
* **Normalized node attributes.** All data (EPI, phase `θ`, frequency `νf`, `ΔNFR`, etc.) live in `G.nodes[n]` under compatible alias names, making extensions and custom hooks straightforward.
|
|
59
|
-
|
|
60
|
-
* **Sense Index (`Si`).** Combines normalized frequency, phase dispersion, and field magnitude to evaluate each node’s “sense,” influencing glyph selection.
|
|
61
|
-
|
|
62
|
-
* **Step-wise engine.** `dynamics.step` orchestrates eight phases: field computation, `Si`, glyph selection & application, integration, clamps, phase coordination, history update, and conditioned re-mesh.
|
|
63
|
-
|
|
64
|
-
* **Glyphs as operators.** Each glyph applies a smooth transformation to node attributes (emission, diffusion, coupling, dissonance, etc.), dispatched by a configurable, typographic name.
|
|
65
|
-
|
|
66
|
-
* **Network re-mesh.** Mixes the current state with a past one (memory `τ`) to stabilize the network, with clear precedence for `α` and conditions based on recent stability and synchrony history.
|
|
67
|
-
|
|
68
|
-
* **Γ(R) coupling.** Optional network term added to the nodal equation, parameterized by global phase order `R` with gain `β` and threshold `R0` (see `DEFAULTS["GAMMA"]`).
|
|
69
|
-
|
|
70
|
-
* **Callbacks & observers.** The `Γ(R)` system lets you hook functions before/after each step and after re-mesh, enabling monitoring or external intervention.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Recommendations for Going Deeper
|
|
75
|
-
|
|
76
|
-
* **NetworkX & the Graph API.** Get comfortable with how NetworkX handles attributes and topology; all dynamics operate on `Graph` objects and their properties.
|
|
77
|
-
|
|
78
|
-
* **Extending the ΔNFR field.** Explore `set_delta_nfr_hook` to implement alternative nodal fields and learn how metadata and mixing weights are recorded.
|
|
79
|
-
|
|
80
|
-
* **Designing new glyphs.** Review `operators.py` to add operators or adjust factors in `DEFAULTS['GLYPH_FACTORS']`.
|
|
81
|
-
|
|
82
|
-
* **Custom observers.** Implement your own metrics via `register_callback` or by extending `observers.py` to measure phenomena specific to your study.
|
|
83
|
-
|
|
84
|
-
* **Theoretical reading.** For conceptual background, see the included PDFs (`TNFR.pdf`, *El Pulso que nos Atraviesa*), which deepen the fractal-resonant framework.
|
|
85
|
-
|
|
86
|
-
* **Advanced parameters.** Experiment with adaptive phase coordination, stability criteria, and the glyph grammar to observe their impact on network self-organization.
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
**Mastering these pieces will let you extend the simulation, build analysis pipelines and connect the theory with computational applications.**
|
|
91
|
-
|
|
92
|
-
## Optional Node environment
|
|
93
|
-
The repository includes a minimal `package.json` and `netlify.toml` used for an experimental Remix web demo. They are not required for the core Python package; feel free to ignore them unless you plan to build the demo via `npm run build`.
|
|
94
|
-
|
|
95
|
-
## Testing
|
|
96
|
-
|
|
97
|
-
Install the dependencies and project in editable mode before running the test suite with `pytest`:
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
pip install networkx
|
|
101
|
-
pip install -e .
|
|
102
|
-
pytest
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Installation
|
|
107
|
-
```
|
|
108
|
-
pip install tnfr
|
|
109
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|