Skip to content

v2.2.0

Choose a tag to compare

@github-actions github-actions released this 17 Aug 11:31
· 5 commits to main since this release
d13973a

Minor Changes

  • #32 3baa78c Thanks @davidkpiano! - Add lazy, multi-source, directional, radius-limited postorder traversal. Keep
    active traversal structure stable across graph mutations and reject non-finite
    A-star heuristic values.

  • e4a800e Thanks @davidkpiano! - Add immutable counterparts for graph CRUD, patch application, and layout geometry updates. These helpers return updated graph copies while leaving their input graphs untouched.

  • 7b5ac38 Thanks @davidkpiano! - Add graph-generic path-set and coverage utilities: path inspection and
    containment, coverage targets and coverage-preserving reduction, edge-covering
    path planning, ordered shortest simple paths, Eulerian paths/circuits, and line
    graph construction.

  • #31 0bd1016 Thanks @davidkpiano! - Add multi-source, directional, radius-limited BFS and DFS; induced neighborhood subgraphs; and graph union, intersection, difference, symmetric difference, disjoint union, and complement operations.

  • 97622b1 Thanks @davidkpiano! - New algorithms, public kernel, cancellation, and format fidelity:

    • New algorithms: isPlanar (left-right planarity test), getTSPTour
      (nearest-neighbor + 2-opt), getSteinerTree (metric-closure
      2-approximation), getGraphColoring/isValidColoring (Welsh–Powell and
      DSatur), genAllPairsShortestPaths (lazy gen twin of
      getAllPairsShortestPaths).
    • New generators: createWattsStrogatzGraph, createBarabasiAlbertGraph.
    • New @statelyai/graph/kernel subpath: getIndex, getCSR,
      invalidateIndex, and memoizeByGraph — the fast-path primitives for
      large graphs and third-party algorithm plugins.
    • Cancellation: expensive algorithms (centrality, community detection,
      max-flow, all-pairs paths, isomorphism, dominators) accept
      options.signal: AbortSignal.
    • Round-trip fidelity: DOT preserves graph attributes, node/edge
      defaults, rank=same, HTML labels, and compass points; Mermaid preserves
      %%{init}%% directives, click handlers, linkStyle (now index-stable),
      state notes, mindmap ::icon(), and block arrow tokens.
    • Fix: getAllPairsShortestPaths no longer overflows the call stack on
      graphs with a few hundred nodes.
    • Benchmarks: reproducible via pnpm bench:compare (--quick variant,
      JSON results, generated docs tables, fairness notes).
  • #33 66b3828 Thanks @davidkpiano! - 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.