Skip to content

Cubitt in-memory graph with subgraphs and connectors

Notifications You must be signed in to change notification settings

uu-cubitt/graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cubitt Graph

Typescript Graph library for the Cubitt framework.

npm version GitHub license Build Status Test Coverage

About

This package contains an in-memory graph with connectors. All Elements have support for dynamic properties. The graph has the following elements:

  • Model A subgraph inside the graph. All Nodes and Edges have to be linked to a Model.
  • Node A traditional Node.
  • Connector A Connector is an element that is connected to a Node, to which edges can be connected. A Node can have many connectors. A Connector can have many edges.
  • Edge An traditional directed edge that can be connected to connectors. It is not possible to connect an Edge directly to a Node.

It's main use case will be for the Cubitt framework, but the graph can be used standalone if it fits your datamodel.

Installation

$ npm install cubitt-graph

Features

  • Intergraph links
  • Hierarchical graphs
  • Connector support
  • Properties support on all Elements
  • Typescript
  • Unit tested

Usage

The Project class (implements GraphInterface) is the main entrypoint for consumers of this package. It is as simple as:

var graph = new Project();

All available methods on this class are described in the Code documentation.

Documentation

For developers

To generate documentation run:

$ npm install --only=dev
$ node_modules/.bin/typedoc --out doc/ --module commonjs --exclude test --readme README.md --target ES5 --mode file src/

To run the tests:

$ npm install --only=dev
$ cd node_modules/cubitt-graph
$ mocha

To debug the tests (uses node-debug, uses Chrome debugging tools):

  1. First set sourceMaps to true in src/tsdconfig.json (ensures that you can debug the Typescript code instead of the generated JavaScript)
$ npm install --only=dev
$ node-debug _mocha --no-timeouts

People

The original authors of Cubitt are Sander Klock and Thomas Ipskamp. The project is coordinated by Jan Martijn van der Werf.

License

MIT

About

Cubitt in-memory graph with subgraphs and connectors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published