@buggyorg/dupjoin
Advanced tools
Comparing version
@@ -115,4 +115,4 @@ 'use strict'; | ||
} else { | ||
var d1 = createDuplicates({ node: dup.v, port: 'd1', parent: node.parent, type: node.type }, successors, from, from + Math.floor((from + to) / 2)); | ||
var d2 = createDuplicates({ node: dup.v, port: 'd2', parent: node.parent, type: node.type }, successors, Math.ceil(from + Math.floor((from + to) / 2) + 1), to); | ||
var d1 = createDuplicates({ node: dup.v, port: 'd1', parent: node.parent, type: node.type }, successors, from, Math.floor((from + to) / 2)); | ||
var d2 = createDuplicates({ node: dup.v, port: 'd2', parent: node.parent, type: node.type }, successors, Math.floor((from + to) / 2) + 1, to); | ||
return { | ||
@@ -136,4 +136,4 @@ nodes: _lodash2.default.concat(dup, d1.nodes, d2.nodes), | ||
} else { | ||
var d1 = createJoins({ node: jn.v, port: 'in1', parent: node.parent, type: node.type }, predecessors, from, from + Math.floor((from + to) / 2)); | ||
var d2 = createJoins({ node: jn.v, port: 'in2', parent: node.parent, type: node.type }, predecessors, Math.ceil(from + Math.floor(from + to) / 2 + 1), to); | ||
var d1 = createJoins({ node: jn.v, port: 'in1', parent: node.parent, type: node.type }, predecessors, from, Math.floor((from + to) / 2)); | ||
var d2 = createJoins({ node: jn.v, port: 'in2', parent: node.parent, type: node.type }, predecessors, Math.floor(from + to) / 2 + 1, to); | ||
return { | ||
@@ -140,0 +140,0 @@ nodes: _lodash2.default.concat(jn, d1.nodes, d2.nodes), |
{ | ||
"name": "@buggyorg/dupjoin", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "Program that removes multiple out and in edges in a NG.", | ||
@@ -5,0 +5,0 @@ "main": "lib/api.js", |
@@ -106,4 +106,4 @@ | ||
} else { | ||
var d1 = createDuplicates({node: dup.v, port: 'd1', parent: node.parent, type: node.type}, successors, from, from + Math.floor((from + to) / 2)) | ||
var d2 = createDuplicates({node: dup.v, port: 'd2', parent: node.parent, type: node.type}, successors, Math.ceil(from + Math.floor((from + to) / 2) + 1), to) | ||
var d1 = createDuplicates({node: dup.v, port: 'd1', parent: node.parent, type: node.type}, successors, from, Math.floor((from + to) / 2)) | ||
var d2 = createDuplicates({node: dup.v, port: 'd2', parent: node.parent, type: node.type}, successors, Math.floor((from + to) / 2) + 1, to) | ||
return { | ||
@@ -129,4 +129,4 @@ nodes: _.concat(dup, d1.nodes, d2.nodes), | ||
} else { | ||
var d1 = createJoins({node: jn.v, port: 'in1', parent: node.parent, type: node.type}, predecessors, from, from + Math.floor((from + to) / 2)) | ||
var d2 = createJoins({node: jn.v, port: 'in2', parent: node.parent, type: node.type}, predecessors, Math.ceil(from + Math.floor(from + to) / 2 + 1), to) | ||
var d1 = createJoins({node: jn.v, port: 'in1', parent: node.parent, type: node.type}, predecessors, from, Math.floor((from + to) / 2)) | ||
var d2 = createJoins({node: jn.v, port: 'in2', parent: node.parent, type: node.type}, predecessors, Math.floor(from + to) / 2 + 1, to) | ||
return { | ||
@@ -133,0 +133,0 @@ nodes: _.concat(jn, d1.nodes, d2.nodes), |
137051
-0.07%