Socket
Book a DemoInstallSign in
Socket

graphology-bipartite

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphology-bipartite

Bipartite graph functions for graphology.

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

Graphology Bipartite

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

Installation

npm install graphology-bipartite

Usage

  • isBypartiteBy

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.

Keywords

graph

FAQs

Package last updated on 15 Nov 2021

Did you know?

Socket

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