This package has been deprecated

Author message:

WARNING: This project has been renamed to @seregpie/bron-kerbosch.

almete.bronkerbosch

18.1.14 • Public • Published

almete.BronKerbosch

almete.BronKerbosch(edges)

Implementation of Bron-Kerbosch algorithm to find maximal cliques in an undirected graph. This algorithm variant uses pivoting and a modification developed by Tomita.

argument description
edges An iterable of edges to build the graph from. An edge is an array of two nodes.

Returns maximal cliques as an array of arrays.

dependencies

no dependencies

setup

npm

npm install almete.bronkerbosch

ES module

import BronKerbosch from 'almete.bronkerbosch';

Node

const BronKerbosch = require('almete.bronkerbosch');

browser

<script src="https://unpkg.com/almete.bronkerbosch"></script>

The function BronKerbosch will be available under the namespace almete.

Include polyfills to support older browsers.

<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>

usage

let edges = [[6, 4], [4, 3], [4, 5], [5, 2], [5, 1], [1, 2]];
let cliques = almete.BronKerbosch(edges);
// => [[4, 6], [4, 3], [4, 5], [2, 5, 1]]

see also

Package Sidebar

Install

npm i almete.bronkerbosch

Weekly Downloads

18

Version

18.1.14

License

MIT

Last publish

Collaborators

  • npm