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
Add getMappedGraph and getFilteredGraph transforms (#33)
* Add getMappedGraph and getFilteredGraph transforms
Predicate-based filtering and data-mapping transforms that preserve
graph structure, closing the map/filter API gap with effect/graph
(mapNodes/mapEdges/filterNodes/filterEdges). Dropping a node drops its
incident edges and strips dangling parent/initial references, matching
getSubgraph semantics.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATzbKkoDMTaWLqD8xZBQNv
* Preserve graph direction/style in transforms; add changeset
Forward graph-level direction and style in getMappedGraph,
getFilteredGraph, getSubgraph, and getReversedGraph so transformed
graphs keep their top-level drawing settings. Adds a changeset for the
new transforms.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATzbKkoDMTaWLqD8xZBQNv
---------
Co-authored-by: Claude <noreply@anthropic.com>
Add `getMappedGraph()` and `getFilteredGraph()` structural transforms. `getMappedGraph()` returns a new graph with node/edge `data` transformed by mapping functions while preserving all structure; `getFilteredGraph()` returns a new graph keeping only nodes and edges that pass the given predicates, dropping incident edges of removed nodes. `getSubgraph()`, `getReversedGraph()`, and the new transforms now also preserve graph-level `direction` and `style`.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -408,7 +408,7 @@ Beyond classic graph algorithms, the library also includes utilities for evolvin
408
408
409
409
-`getDiff()`, `getPatches()`, `getPatchedGraph()` (immutable), and `updateGraphWithPatches()` (mutable) for graph change tracking
410
410
-`genRandomWalk()`, `genWeightedRandomWalk()`, and coverage helpers for model-based testing and simulation
411
-
-`getSubgraph()`, `getNeighborhood()`, `getReversedGraph()`, and `getLineGraph()` for structural transforms
411
+
-`getSubgraph()`, `getFilteredGraph()`, `getMappedGraph()`, `getNeighborhood()`, `getReversedGraph()`, and `getLineGraph()` for structural transforms
412
412
-`getGraphUnion()`, `getGraphIntersection()`, `getGraphDifference()`, `getGraphSymmetricDifference()`, `getDisjointUnion()`, and `getGraphComplement()` for graph set operations
413
413
414
414
Binary set operations match nodes and edges by stable ID, require matching graph modes, and retain graph metadata from the left operand. Union and intersection use right-side entity data when IDs conflict. Disjoint union keeps left IDs and deterministically remaps right-side collisions.
0 commit comments