Skip to main content
Home

Built and signed on GitHub Actions

Pathfinding algorithms

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
82%
Published
a month ago (1.1.1)
f
aStar

Compute a shortest path using the A* search algorithm.

f
aStarBag

Compute all shortest paths using the A* search algorithm. Whereas aStar (non-deterministic-ally) returns a single shortest path, aStarBag returns all shortest paths (in a non-deterministic order).

I
CostOptions
No documentation available
v
numberCostOptions
No documentation available
f
countPaths

Count the total number of possible paths to reach a destination. There must be no loops in the graph, or the function will overflow its stack.

I
CountPathsOptions
No documentation available
f
buildPath

Build a path leading to a target according to a parents map, which must contain no loop. This function can be used after dijkstraAll or dijkstraPartial to build a path from a starting point to a reachable target.

f
dijkstra

Compute a shortest path using the Dijkstra search algorithm.

f
dijkstraAll

Determine all reachable nodes from a starting point as well as the minimum cost to reach them and a possible optimal parent node using the Dijkstra search algorithm.

I
f
dijkstraPartial

Determine some reachable nodes from a starting point as well as the minimum cost to reach them and a possible optimal parent node using the Dijkstra search algorithm.

f
componentIndex

Locate vertices amongst disjoint sets.

f
components

Separate components of an undirected graph into disjoint sets.

f
createGroups

Extract connected components from a graph.

f
separateComponents

Separate components of an undirected graph into disjoint sets.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.