From b88d3c9bfa29f36f68b6e72488797077011c6ea8 Mon Sep 17 00:00:00 2001 From: Pitchaya Boonsarngsuk <2285135b@student.gla.ac.uk> Date: Sat, 10 Feb 2018 16:26:17 +0000 Subject: [PATCH 1/2] Remove from "TO WRITE" readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83173cf..47572dd 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ If *threshold* is specified, sets a threshold and returns this force. When the a If *handler* is specified, sets a handler function which will be called at the end of each iteration if the average velocity changes of the system goes below the [threshold](#neighbourSampling_stableVelocity), and returns this force. To remove the handler, change it to null. If *threshold* is not specified, returns the current value, which defaults to null. -### Hybrid Layout Simulation - TO WRITE +### Hybrid Layout Simulation The hybrid layout algorithm reduces the computation power usage even further by performing neighbour and sampling algorithm on only $\sqrt{n}$ sample subset of the data, and interpolating the rest in. Neighbour and sampling algorithm may also be ran again over the full dataset after the interpolation to refine the layout. This algorithm is only recommended for visualizing larger dataset. From 6813be06df1375b2bf1e4851ab129a56bf01b327 Mon Sep 17 00:00:00 2001 From: Pitchaya Boonsarngsuk <2285135b@student.gla.ac.uk> Date: Mon, 12 Feb 2018 08:06:53 +0000 Subject: [PATCH 2/2] Velo changes scale per node instead --- examples/js/src/example-papaparsing/linkForce.js | 2 +- src/link.js | 2 +- src/neighbourSampling.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/js/src/example-papaparsing/linkForce.js b/examples/js/src/example-papaparsing/linkForce.js index 5df2a64..ec541d1 100644 --- a/examples/js/src/example-papaparsing/linkForce.js +++ b/examples/js/src/example-papaparsing/linkForce.js @@ -15,7 +15,7 @@ function startLinkSimulation() { .distance(function (n, m) { return distanceFunction(n, m, props, norm); }) - .stableVelocity(0.000001) //TODO + .stableVelocity(0) //TODO .onStableVelo(ended); } else { diff --git a/src/link.js b/src/link.js index af7f53f..f99e0a3 100644 --- a/src/link.js +++ b/src/link.js @@ -54,7 +54,7 @@ export default function() { node = nodes[i]; velocityDiff += Math.abs(Math.hypot(node.vx-node.oldvx, node.vy-node.oldvy)); } - velocityDiff /= n*(n-1); + velocityDiff /= n; latestVelocityDiff = velocityDiff; if(velocityDiff