Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A robust & multipurpose Graph object for JavaScript & TypeScript.

License

NotificationsYou must be signed in to change notification settings

cgb-javascript-css-typescript/graphology

 
 

Repository files navigation

Build StatusDOI

Graphology

graphology is a robust & multipurposeGraph object for JavaScript and TypeScript.

It aims at supporting various kinds of graphs with the same unified interface.

Agraphology graph can therefore be directed, undirected or mixed, allow self-loops or not, and can be simple or support parallel edges.

Along with thisGraph object, one will also find a comprehensivestandard library full of graph theory algorithms and common utilities such as graph generators, layouts, traversals etc.

Finally,graphology graphs are able to emit a wide variety ofevents, which makes them ideal to build interactive renderers for the browser. It is for instance used bysigma.js as its data backend.

Installation

To installgraphology using npm, run the following command:

npm install graphology

Legacy bundle

Standalone builds ofgraphology and its full standard library can be found in the repository'sreleases if you can only rely on your ownscript tags to load code.

<!-- To use a Graph object --><scriptsrc="graphology.min.js"></script><!-- This exposes a global variable named "graphology" --><script>constgraph=newgraphology.Graph();const{UndirectedGraph, DirectedGraph}=graphology;</script><!-- To use the standard library --><scriptsrc="graphology-library.min.js"></script><!-- This exposes a global variable named "graphologyLibrary" --><script>constdensity=graphologyLibrary.metrics.graph.density(graph);</script>

Be warned that the standard library bundle often lags behind and is not always completely up to date.

TypeScript usage

Note thatgraphology also exports type declaration that are installed along using peer dependencies so it can be used withTypeScript out of the box.

If your version of npm is a bit old, you may need to installgraphology-types yourself if the peer dependency resolution is not made for you already:

npm install graphology-types

It can also be useful to pingraphology-types version in yourpackage.json to avoid resolution issues sometimes.

How to cite

graphology is published onZenodo asDOI

You can cite it thusly:

Guillaume Plique. (2021). Graphology, a robust and multipurpose Graph object for JavaScript. Zenodo.https://doi.org/10.5281/zenodo.5681257

Changelog

A complete changelog can be foundhere.

About

A robust & multipurpose Graph object for JavaScript & TypeScript.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript99.9%
  • Other0.1%

[8]ページ先頭

©2009-2025 Movatter.jp