graphology-metrics
Advanced tools
Comparing version 1.18.1 to 1.18.2
@@ -22,4 +22,4 @@ /** | ||
var SparseSet = require('mnemonist/sparse-set'); | ||
var OutboundNeighborhoodIndex = | ||
require('graphology-indices/neighborhood/outbound').OutboundNeighborhoodIndex; | ||
var NeighborhoodIndex = | ||
require('graphology-indices/neighborhood').NeighborhoodIndex; | ||
@@ -45,9 +45,3 @@ // TODO: can be computed for a single node | ||
function IndexedBFS(graph) { | ||
// TODO: this is a temp hack linked to #288! | ||
var outboundNeighbors = graph.outboundNeighbors; | ||
var inboundNeighbors = graph.inboundNeighbors; | ||
graph.outboundNeighbors = inboundNeighbors; | ||
this.index = new OutboundNeighborhoodIndex(graph); | ||
graph.outboundNeighbors = outboundNeighbors; | ||
this.index = new NeighborhoodIndex(graph, 'inbound'); | ||
this.queue = new FixedDeque(Array, graph.order); | ||
@@ -54,0 +48,0 @@ this.seen = new SparseSet(graph.order); |
@@ -20,4 +20,4 @@ /** | ||
var resolveDefaults = require('graphology-utils/defaults'); | ||
var WeightedOutboundNeighborhoodIndex = | ||
require('graphology-indices/neighborhood/outbound').WeightedOutboundNeighborhoodIndex; | ||
var WeightedNeighborhoodIndex = | ||
require('graphology-indices/neighborhood').WeightedNeighborhoodIndex; | ||
@@ -89,3 +89,3 @@ /** | ||
var index = new WeightedOutboundNeighborhoodIndex(graph, weightAttribute); | ||
var index = new WeightedNeighborhoodIndex(graph, weightAttribute); | ||
@@ -92,0 +92,0 @@ var i, j, l, w; |
@@ -13,4 +13,4 @@ /** | ||
var resolveDefaults = require('graphology-utils/defaults'); | ||
var WeightedOutboundNeighborhoodIndex = | ||
require('graphology-indices/neighborhood/outbound').WeightedOutboundNeighborhoodIndex; | ||
var WeightedNeighborhoodIndex = | ||
require('graphology-indices/neighborhood').WeightedNeighborhoodIndex; | ||
@@ -65,3 +65,3 @@ /** | ||
var index = new WeightedOutboundNeighborhoodIndex(graph, weightAttribute); | ||
var index = new WeightedNeighborhoodIndex(graph, weightAttribute); | ||
@@ -68,0 +68,0 @@ var i, j, l, d; |
{ | ||
"name": "graphology-metrics", | ||
"version": "1.18.1", | ||
"version": "1.18.2", | ||
"description": "Miscellaneous graph metrics for graphology.", | ||
@@ -55,3 +55,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"graphology-shortest-path": "^1.5.1", | ||
"graphology-shortest-path": "^1.5.2", | ||
"graphology-utils": "^2.3.0", | ||
@@ -58,0 +58,0 @@ "mnemonist": "^0.38.3" |
95098
2318