Skip to content

Commit 7ed55ee

Browse files
authored
Add Operation Module (#12)
* Add operations module * Update operations module * Delete property tests * Update test_module.sh to run selected tests * Unused import warning
1 parent b1e29ac commit 7ed55ee

File tree

5 files changed

+1655
-17
lines changed

5 files changed

+1655
-17
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
- **Graph Operations Module** (`yog/operation`): New module implementing set-theoretic graph operations following NetworkX's "Graph as a Set" philosophy:
13+
- **Set-Theoretic Operations**: `union/2`, `intersection/2`, `difference/2`, `symmetric_difference/2` for combining and comparing graphs
14+
- **Composition & Joins**: `disjoint_union/2` (safe combination with auto re-indexing), `cartesian_product/2` (for grids and hypercubes), `compose/2` (merge overlapping graphs)
15+
- **Graph Powers**: `power/2` creates the k-th power of a graph (connects nodes within distance k), useful for reachability analysis
16+
- **Structural Comparison**: `is_subgraph/2` for subset validation, `is_isomorphic/2` for checking structural identity (with quick checks for node/edge counts and degree sequences)
17+
- All operations preserve graph structure and handle edge data appropriately
18+
- See module documentation for algorithm complexities and use cases
19+
1220
- **Connected Components Algorithms** (`yog/connectivity`): New functions for finding connected components in undirected and weakly connected components in directed graphs:
1321
- `connected_components/1` - Find connected components in undirected graphs using DFS
1422
- `weakly_connected_components/1` - Find weakly connected components in directed graphs (treating edges as undirected)
1523
- Both algorithms run in O(V + E) time complexity
1624
- See module documentation for comparison with existing SCC algorithms
1725

18-
1926
## 5.0.0 - 2026-03-20
2027

2128
### Breaking Changes

0 commit comments

Comments
 (0)