You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
59
59
let dot_string = dot.to_dot(my_graph, options)
60
60
```
61
61
62
+
### Documentation
63
+
64
+
- **Experimental Module Notices**: Added experimental status warnings to `yog/multi/*` (multigraphs) and `yog/dag/*` (DAG-specific operations) modules:
65
+
- These modules are functional with minimal, working implementations
66
+
- May not be fully optimized for performance
67
+
- Additional features and performance enhancements planned
68
+
- API may be subject to change in future versions
69
+
- Notice added to all module files and documented in README under "⚠️ Experimental Features" section
70
+
62
71
### Changed
63
72
64
73
- **Consistent Parameter Labels**: Added descriptive labels to all semiring and algorithm parameters across pathfinding, centrality, health, and community detection modules for improved API consistency and self-documentation:
@@ -70,6 +79,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
70
79
- **Backward compatible**: Both labeled and unlabeled calls are supported (e.g., `dijkstra.shortest_path(graph, 1, 5, 0, int.add, int.compare)` and `dijkstra.shortest_path(in: graph, from: 1, to: 5, with_zero: 0, with_add: int.add, with_compare: int.compare)` both work)
71
80
- Follows the pattern established by Dijkstra's algorithm for a more uniform and intuitive API
72
81
82
+
### Fixed
83
+
84
+
- **Eigenvector Centrality Oscillation Bug** (`yog/centrality`): Fixed critical bug where eigenvector centrality would oscillate and never converge for symmetric graphs:
85
+
- **Problem**: Star graphs and other symmetric structures caused the power iteration algorithm to oscillate between two states indefinitely (e.g., [0.816, 0.408, 0.408] ↔ [0.577, 0.577, 0.577])
86
+
- **Root Cause**: Uniform initialization [1/√n, 1/√n, ...] contained equal components of eigenspaces with eigenvalues of equal magnitude but opposite signs (e.g., +√2 and -√2), causing 2-cycle oscillation
87
+
- **Solution**:
88
+
- Added small node-ID-based perturbation to initial vector to break symmetry: `1.0 + (id / 1000.0)`
89
+
- Implemented 2-cycle oscillation detection by tracking state from 2 iterations ago
90
+
- When oscillation is detected, returns the normalized average of the two oscillating states, which approximates the true principal eigenvector
91
+
- **Impact**: 2-leaf star graphs now correctly return center ≈ 0.707, leaves ≈ 0.5 (ratio √2 ≈ 1.414) instead of all nodes ≈ 0.577
92
+
- **Tests Added**:
93
+
- `eigenvector_2leaf_star_exact_test` - Validates exact eigenvector values with mathematical precision
94
+
- `eigenvector_triangle_exact_test` - Tests complete triangle (K3) for equal centrality
95
+
- `eigenvector_linear_chain_test` - Validates 5-node chain with symmetry properties
96
+
- `eigenvector_barbell_test` - Tests two triangles connected by bridge, validates bridge nodes have higher centrality
97
+
- All existing tests continue to pass with improved numerical accuracy
0 commit comments