Skip to content

Improve graph algorithms and fix bugs#35

Merged
ecraig12345 merged 3 commits intomainfrom
ecraig/graph-fixes
Feb 19, 2026
Merged

Improve graph algorithms and fix bugs#35
ecraig12345 merged 3 commits intomainfrom
ecraig/graph-fixes

Conversation

@ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Feb 18, 2026

This PR improves the efficiency of the graph algorithms, adds test coverage, and fixes bugs in the priority queue ordering logic.

Core library improvements

  • Rewrote the core graph algorithms in PGraph for greater efficiency, improved cycle detection, and support for both object and map node definitions.
  • Fixed the PriorityQueue implementation to correctly maintain the heap property (ensuring correct removal order)
  • Added more granular tests for PriorityQueue and getNodeCumulativePriorities

API and packaging

  • Export the PGraph class, and only export necessary types
  • Add support for passing in either an object or a map
  • Only publish the necessary files, not the tests

Documentation

  • Improve function and type docs
  • Improve docs in readme
  • Move contributing instructions to CONTRIBUTING.md

@ecraig12345 ecraig12345 force-pushed the ecraig/graph-fixes branch 2 times, most recently from e0f46f5 to 49cce5e Compare February 19, 2026 01:44
@ecraig12345 ecraig12345 merged commit a2ffcc7 into main Feb 19, 2026
5 checks passed
@ecraig12345 ecraig12345 deleted the ecraig/graph-fixes branch February 19, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant