Change velocity-difference threshold calculation method and misc small non-functional changes (PROPER)

This commit is contained in:
Pitchaya Boonsarngsuk
2018-01-24 08:55:49 +00:00
parent df652ffec6
commit 6b53b3301d
7 changed files with 95 additions and 279 deletions

View File

@@ -39,7 +39,7 @@ export default function (nodes, config) {
.sampleSize(sampleSize)
.distanceRange(distanceRange)
.distance(distanceFn)
.stableVelocity(60)
.stableVelocity(0.004)
.stableVeloHandler(function(){sampleSimulation.stop(); ended();})
)
.alpha(1).restart();
@@ -52,14 +52,11 @@ export default function (nodes, config) {
event.call("startFull");
console.log("Ended sample simulation");
alert('About to interpolate');
interpBruteForce(sample, remainder, distanceFn);
/*
if (PIVOTS) {
interpolationPivots(sample, remainder, sampleSubSet, NUMPIVOTS, distance);
interpolationPivots(sample, remainder, NUMPIVOTS, distanceFn);
} else {
interpBruteForce(sample, remainder, sampleSubSet, distance);
interpBruteForce(sample, remainder, distanceFn);
}
*/
event.call("fullTick");
alert('About to Full run');
if (FULL_ITERATIONS==0) {
@@ -77,7 +74,7 @@ export default function (nodes, config) {
.sampleSize(FullsampleSize)
.distanceRange(FulldistanceRange)
.distance(distanceFn)
.stableVelocity(60)
.stableVelocity(0.004)
.stableVeloHandler(function(){fullSimulation.stop(); event.call("end");})
)
.on("tick", function () {
@@ -152,5 +149,5 @@ export default function (nodes, config) {
}
function readConf(config, prop, def){
return config.hasOwnProperty(prop) ? config.prop : def;
return config.hasOwnProperty(prop) ? config[prop] : def;
}