0.0.26 • Published 5 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-utilsor NPM
npm i @ertrzyiks/graph-utils --saveBasic 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
5 years ago
0.0.25
6 years ago
0.0.24
6 years ago
0.0.20
6 years ago
0.0.21
6 years ago
0.0.22
6 years ago
0.0.23
6 years ago
0.0.19
6 years ago
0.0.16
6 years ago
0.0.17
6 years ago
0.0.18
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.3
6 years ago
0.0.4
6 years ago
0.0.2
6 years ago