graphology-bipartite
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Graphology Bipartite

Functions related to bipartite graphs and to be used with graphology.

Installation

npm install graphology-bipartite

Usage

isBypartiteBy

Returns whether the given graph is bipartite according to the given partition scheme.

import {isBypartiteBy} from 'graphology-bipartite';
// Alternatively, to load only the relevant code:
import isBypartiteBy from 'graphology-bipartite/is-bipartite-by';

// Wrt some node attribute:
isBipartiteBy(graph, 'category');

// Using some getter function:
isBipartiteBy(graph, (node, attr) => externalIndex[node].category);

Arguments

  • graph Graph: target graph.
  • getNodePartition string|function: node attribute name or getter function taking a node entry (node, attributes) and returning this node's partition.

Package Sidebar

Install

npm i graphology-bipartite

Weekly Downloads

5

Version

0.0.3

License

MIT

Unpacked Size

4.19 kB

Total Files

7

Last publish

Collaborators

  • yomguithereal