0.1.2 • Published 2 years ago

@alexdaiii/mini-nxjs v0.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

@alexdaiii/mini-nxjs

@alexdaiii/mini-nxjs-cls is a simple graph theory library for JavaScript. It implements basic graph theory algorithms on unweighted graphs. Graph algorithms are implemented in an

Installation

npm install @alexdaiii/mini-nxjs

Usage

@alexdaiii/mini-nxjs only implements two types of graphs: DirectedGraph and UndirectedGraph.

These graphs are unweighted, do not allow self-loops, and do not allow parallel edges.

Example

import {DiGraph, algorithms} from "@alexdaiii/mini-nxjs";

const graph = new DiGraph<number>();
graph.addEdge(1, 2);
graph.addEdge(2, 3);

const path = algorithms.shortestPath(graph, 1, 3);

API Documentation

Docs

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago