New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

betweenness

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

betweenness

Calculates the 'betweenness centrality' of a graph using Brandes' algorithm (On variants of shortest-path betweenness centrality and their generic computation [2008]).

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Betweenness.js

Determines the betweenness centrality values of a graph using Brandes' algorithm On variants of shortest-path betweenness centrality and their generic computation [2008].

Usage

var nodes = [ 
    { id: 0, outEdges: [ 1 ] }, 
    { id: 1 } ];

var betweenness = require("betweenness");
betweenness.vertex().nodes(nodes).calc();

Install

npm install betweenness

Supported Betweenness Types

TypeImplementationDescription
Vertex Betweennessvertex()Classic shortest-path betweenness, the score of v equals the number of shortest paths v lies on.
Vertex Betweenness with EndpointsvertexWithEndpoints()Same as before, adds to the score of a v the number of vertices that can be reached by v and that reach v.
Edge Betweennessedge()The score of an edge e is the number of shortest paths e is part of.

In Brandes' paper more variants are listed and it is easy to add them to the implementation. If you miss a variation feel free to add it.

Keywords

FAQs

Package last updated on 10 Sep 2014

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc