Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphology-metrics

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphology-metrics - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

4

layout-quality/stress.js

@@ -35,2 +35,6 @@ /**

// We choose an arbitrary large distance for when two nodes cannot be
// connected because they belong to different connected components
// and because we cannot deal with Infinity in our computations
// This is what most papers recommend anyway
var maxDistance = graph.order * 4;

@@ -37,0 +41,0 @@

@@ -18,2 +18,6 @@ /**

*
* Regarding the directed version, one has to understand that the undirected
* version's is basically considering the graph as a directed one where all
* edges would be mutual.
*
* Hence, here are the retained formulas:

@@ -79,2 +83,16 @@ *

*
* Gephi's version of undirected delta computation:
* ------------------------------------------------
*
* ∆Qgephi = dic - (di * Ztot) / 2m
*
* Note that the above formula is erroneous and should really be:
*
* ∆Qgephi = dic - (di * Ztot) / m
*
* because then: ∆Qgephi = ∆Q * 2m
*
* It is used because it is faster to compute. Since Gephi's error is only by
* a constant factor, it does not make the result incorrect.
*
* [Latex]

@@ -467,2 +485,4 @@ *

// NOTE: the formula is a bit unclear here but nodeCommunityDegree should be
// given as the edges count * 2
function undirectedModularityDelta(M, communityTotalWeight, nodeDegree, nodeCommunityDegree) {

@@ -469,0 +489,0 @@ return (

4

package.json
{
"name": "graphology-metrics",
"version": "1.10.0",
"version": "1.10.1",
"description": "Miscellaneous graph metrics for graphology.",

@@ -69,3 +69,3 @@ "main": "index.js",

"dependencies": {
"graphology-shortest-path": "^1.3.0",
"graphology-shortest-path": "^1.3.1",
"graphology-types": "^0.16.0",

@@ -72,0 +72,0 @@ "graphology-utils": "^1.6.1",

@@ -403,2 +403,6 @@ [![Build Status](https://travis-ci.org/graphology/graphology-metrics.svg)](https://travis-ci.org/graphology/graphology-metrics)

Note that this metric does not work very well when the graph has multiple connected components.
Note also that this metric traverses any given graph as an undirected one.
Runs in `O(N^2)`.

@@ -405,0 +409,0 @@

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