Graph Edge colourer
Implementation of Misra & Gries edge colouring algorithm that produces at most d+1 colours, where d is the maximum degree of the graph. Tends to produce d+1 colours. This is a limitation of the algorithm. Supports an arbitary number of nodes and cases where edges are removed.
Installation
npm install edge-colouring
Usage
const MisraGries = default;const randBetween createSampleRound = ; const limit = 100;const graph = limit isDev: false wSubsets: 'minimal'; graph; let round1 = ;let round2 = ; graph; console;console;console;console; graph;let colours = graphcolours; console;console;console;
;;graph.makeComplete;graph.removeEdgescreateSampleRound20;graph.colourEdges;graph.print;