This package has been deprecated

Author message:

no longer supported

@textile/weave
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Weave: Textile's Opinionated Graph Library

Description

Weave is based on the fine work of JSNetworkX (Javascript port of NetworkX) and NetworkX itself. Weave is developed in Typescript, and as such, is more opinionated than its predecessors. Currently, Weave supports:

  • Data structures for graphs and digraphs
  • A limited set of network structure and analysis measures
  • Nodes can be almost anything that has a string representation
  • Edges can hold maps of arbitrary data (e.g., weights, time-series)
  • Well-tested (for the most part)

Quick example

import {DiGraph, Algorithms} from "./index"
// Build an empty directed graph
const G = new DiGraph(new Map([["name", "graph!"]]))
// Add some edges
G.addEdge(0, 1, new Map([["weight", 2]]))
G.addEdge(1, 2, new Map([["weight", 1]]))
G.addEdge(2, 0, new Map([["weight", 2]]))
// Grab some information about the graph structure
console.log(G.edgeCount())
console.log(Algorithms.degreeCentrality(G)) 

Notes

See CONTRIBUTING.md for contribution guidelines.

Package Sidebar

Install

npm i @textile/weave

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • joewagner
  • awmuncy
  • sanderpick
  • textileio
  • andrewxhill
  • carsonfarmer
  • asutula