graphology-metrics
Advanced tools
Comparing version 1.10.0 to 1.10.1
@@ -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 ( |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68401
1569
415