1.10.6 • Published 19 days ago

gramoloss v1.10.6

Weekly downloads
-
License
MIT
Repository
github
Last release
19 days ago

Gramoloss

Graph (or network) theory tools.

This package contains a graph structure based on a map of edges and arcs (called links). Matrix graph structure is on the road map but not implemented for the moment. Several graph parameters are implemented (degree statistics, chromatic number, vertex cover number, clique number, domination number, ...).

It is still in developpement.

This package is mainly devoted to the online collaborative graph editor gracoon.com :rocket:

Install

npm install gramoloss

Examples

import {AbstractGraph} from "gramoloss";
const g = AbstractGraph.fromEdgesListDefault([[0,1],[0,2],[1,2]]); // create an undirected graph from list of edges
const d = g.maxDegree(); // d = 2
const b = g.hasCycle(); // b = true
for (const v of g.getNeighborsList(0)){
    console.log(v) // print 1 and 2
}

Chromatic number:

import {AbstractGraph} from "gramoloss";
const g = AbstractGraph.fromEdgesListDefault([[0,1],[0,2],[1,2]]); // create the graph K3
console.log(g.chromaticNumber()); // prints 3

Notions

Links are either edges or arcs. Loops are for the moment unimplemented.

Parameters are function which do not modify the graph and which computes in most cases an integer (for example the chromatic number).

Generators are function which return a graph (like generating a random graph with the GNP method).

Mutators are function which modify the underlying graph and which do not return anything (like removing all the leaves of a graph).

Representations are structures which represent the graph with a particular geometrical point of view. For example planar graphs can be represented by contact of circles (unimplemented). An other example is to represent tournaments on a line with only the backwards which are drawn.

Contribute

There are a lot of parameters, generators, modifiers and tests to write. It is planned also to rewrite this package in Rust and to generate a typescript package with WASM.

License

MIT

1.10.6

19 days ago

1.10.5

20 days ago

1.10.4

23 days ago

1.10.3

23 days ago

1.10.2

26 days ago

1.10.1

27 days ago

1.9.35

2 months ago

1.10.0

2 months ago

1.9.34

2 months ago

1.9.33

3 months ago

1.9.32

3 months ago

1.9.31

3 months ago

1.9.29

3 months ago

1.9.28

3 months ago

1.9.27

3 months ago

1.9.30

3 months ago

1.9.26

3 months ago

1.9.25

3 months ago

1.9.24

3 months ago

1.9.23

3 months ago

1.9.22

3 months ago

1.9.21

3 months ago

1.9.20

4 months ago

1.9.19

4 months ago

1.9.18

4 months ago

1.9.17

4 months ago

1.9.16

4 months ago

1.9.15

4 months ago

1.9.14

5 months ago

1.9.13

5 months ago

1.9.12

5 months ago

1.9.11

5 months ago

1.9.10

5 months ago

1.9.9

6 months ago

1.9.8

7 months ago

1.9.7

7 months ago

1.8.1

8 months ago

1.8.0

8 months ago

1.6.0

8 months ago

1.9.6

7 months ago

1.9.5

7 months ago

1.9.4

8 months ago

1.9.3

8 months ago

1.9.2

8 months ago

1.9.1

8 months ago

1.9.0

8 months ago

1.7.0

8 months ago

1.5.9

9 months ago

1.5.8

9 months ago

1.5.7

9 months ago

1.5.6

9 months ago

1.5.5

9 months ago

1.5.4

9 months ago

1.2.0

11 months ago

1.2.3

11 months ago

1.4.0

11 months ago

1.2.2

11 months ago

1.2.1

11 months ago

1.1.8

11 months ago

1.5.3

11 months ago

1.1.7

11 months ago

1.5.2

11 months ago

1.1.6

11 months ago

1.5.1

11 months ago

1.1.5

11 months ago

1.5.0

11 months ago

1.1.4

11 months ago

1.3.1

11 months ago

1.1.3

11 months ago

1.3.0

11 months ago

1.1.1

1 year ago

1.1.2

1 year ago

1.1.0

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago