0.0.26 • Published 4 years ago
@ertrzyiks/graph-utils v0.0.26
Graph utils
A library that helps to create, modify and analyze directed, finite graphs in Typescript.
The graph object is represented with adjacency list. It's build from a list of nodes (vertices) and edges connecting them. Additionally, each node and edge can store a record-like object with their custom properties.
https://ertrzyiks.github.io/graph-utils/
Installation
Using Yarn
yarn add @ertrzyiks/graph-utils
or NPM
npm i @ertrzyiks/graph-utils --save
Basic usage
import {
createGraph,
addNodeInPlace,
addEdgeInPlace
} from '@ertrzyiks/graph-utils'
const graph = createGraph()
addNodeInPlace(graph, { id: 'node-1' })
addNodeInPlace(graph, { id: 'node-2' })
addNodeInPlace(graph, { id: 'node-3' })
addEdgeInPlace(graph, { from: 'node-1', to: 'node-2' })
addEdgeInPlace(graph, { from: 'node-2', to: 'node-1' })
addEdgeInPlace(graph, { from: 'node-1', to: 'node-3' })
See more examples at https://ertrzyiks.github.io/graph-utils/examples
0.0.26
4 years ago
0.0.25
4 years ago
0.0.24
4 years ago
0.0.20
4 years ago
0.0.21
4 years ago
0.0.22
4 years ago
0.0.23
4 years ago
0.0.19
4 years ago
0.0.16
4 years ago
0.0.17
4 years ago
0.0.18
4 years ago
0.0.15
4 years ago
0.0.14
4 years ago
0.0.13
4 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.3
4 years ago
0.0.4
4 years ago
0.0.2
4 years ago