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

graphology-indices

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphology-indices - npm Package Compare versions

Comparing version 0.14.0 to 0.15.0

3

neighborhood/outbound.d.ts

@@ -11,3 +11,2 @@ import Graph from 'graphology-types';

starts: PointerArray;
stops: PointerArray;
nodes: Array<string>;

@@ -26,5 +25,5 @@

weights: Float64Array;
outDegrees: Float64Array;
neighborhood: PointerArray;
starts: PointerArray;
stops: PointerArray;
nodes: Array<string>;

@@ -31,0 +30,0 @@

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

var typed = require('mnemonist/utils/typed-arrays');
var createWeightGetter = require('graphology-utils/getters').createWeightGetter;

@@ -12,3 +13,3 @@ function OutboundNeighborhoodIndex(graph) {

var NeighborhoodPointerArray = typed.getPointerArray(upperBound);
var NodesPointerArrray = typed.getPointerArray(graph.order);
var NodesPointerArray = typed.getPointerArray(graph.order);

@@ -18,3 +19,3 @@ // NOTE: directedSize + undirectedSize * 2 is an upper bound for

this.graph = graph;
this.neighborhood = new NodesPointerArrray(upperBound);
this.neighborhood = new NodesPointerArray(upperBound);

@@ -90,5 +91,5 @@ this.starts = new NeighborhoodPointerArray(graph.order + 1);

var NeighborhoodPointerArray = typed.getPointerArray(upperBound);
var NodesPointerArrray = typed.getPointerArray(graph.order);
var NodesPointerArray = typed.getPointerArray(graph.order);
weightAttribute = weightAttribute || 'weight';
var weightGetter = createWeightGetter(weightAttribute);

@@ -98,4 +99,5 @@ // NOTE: directedSize + undirectedSize * 2 is an upper bound for

this.graph = graph;
this.neighborhood = new NodesPointerArrray(upperBound);
this.neighborhood = new NodesPointerArray(upperBound);
this.weights = new Float64Array(upperBound);
this.outDegrees = new Float64Array(graph.order);

@@ -123,9 +125,8 @@ this.starts = new NeighborhoodPointerArray(graph.order + 1);

neighbor = graph.opposite(node, edge);
weight = graph.getEdgeAttribute(edge, weightAttribute);
weight = weightGetter(graph.getEdgeAttributes(edge));
if (typeof weight !== 'number') weight = 1;
// NOTE: for weighted mixed beware of merging weights if twice the same neighbor
this.neighborhood[n] = ids[neighbor];
this.weights[n++] = weight;
this.outDegrees[i] += weight;
}

@@ -132,0 +133,0 @@ }

{
"name": "graphology-indices",
"version": "0.14.0",
"version": "0.15.0",
"description": "Miscellaneous indices for graphology.",

@@ -5,0 +5,0 @@ "main": "index.js",

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