Socket
Socket
Sign inDemoInstall

almete.bronkerbosch

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    almete.bronkerbosch

Implementation of Bron-Kerbosch algorithm to find maximal cliques in an undirected graph.


Version published
Weekly downloads
7
Maintainers
1
Install size
4.61 kB
Created
Weekly downloads
 

Readme

Source

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.

argumentdescription
edgesAn 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

Keywords

FAQs

Last updated on 14 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc