i-graph
Generalized generalized Petersen graph generator
npm install i-graph
Want to see pretty graphs? Log in now!
1 | downloads in the last week |
9 | downloads in the last month |
Last Published By | |
---|---|
Version | 0.0.0 last updated 11 months ago |
License | MIT |
Keywords | i-graph, generator, Petersen, graph |
Repository | git://github.com/mikolalysenko/i-graph.git (git) |
Dependencies | simplicial-disjoint-union, star-polygon |
Dependents | mikolalysenko-hoarders |
i-graph
The I graph construction gives a family of graphs which generalize the generalized Petersen graph. These graphs make for interesting test cases for various graph algorithms.
Example
var I = require("i-graph")
//First make a Petersen graph:
var petersen = I(5, 2)
//Now make a more complicated graph
var circ = I(9, 6, 3)
require("i-graph")(n, k, j)
Constructs a generalized-generalized Petersen graph.
n
is the number of verticesk
is the step for the inner star polygonj
(optional) is the step for the outer star polygon. If not specified, assume 1 and generate a generalized Petersen graph.
Returns The edges of a generalized Petersen graph.
Credits
(c) 2013 Mikola Lysenko. MIT License