Completed cleanup run
This commit is contained in:
@@ -28,6 +28,7 @@ export default function (nodes, config) {
|
||||
var interpSubset = sampleFromNodes(sample, sample.length, Math.sqrt(sample.length)).sample;
|
||||
|
||||
var sampleSimulation = d3.forceSimulation(sample)
|
||||
.stop()
|
||||
.alphaDecay(1 - Math.pow(0.001, 1 / SAMPLE_ITERATIONS));
|
||||
|
||||
sampleSimulation
|
||||
@@ -38,38 +39,44 @@ export default function (nodes, config) {
|
||||
.force("neighbourSampling", neighbourSamplingDistance()
|
||||
.neighbourSize(neighbourSize)
|
||||
.sampleSize(sampleSize)
|
||||
.distanceRange(distanceRange)
|
||||
.distance(distance)
|
||||
.multiplier(MULTIPLIER)
|
||||
)
|
||||
.stop()
|
||||
.alpha(1).restart();
|
||||
|
||||
function ended() {
|
||||
console.log("Ended sample simulation");
|
||||
/*
|
||||
if (PIVOTS) {
|
||||
interpolationPivots(sample, remainder, interpSubset, NUMPIVOTS, distance);
|
||||
} else {
|
||||
interpolation(sample, remainder, interpSubset, distance);
|
||||
}
|
||||
|
||||
*/
|
||||
if (FULL_ITERATIONS==0) return;
|
||||
fullSimulation = d3.forceSimulation()
|
||||
.stop()
|
||||
.alphaDecay(1 - Math.pow(0.001, 1 / FULL_ITERATIONS));
|
||||
|
||||
event.call("startFull", fullSimulation);
|
||||
|
||||
fullSimulation
|
||||
.force("neighbourSampling", d3.forceNeighbourSampling()
|
||||
.distance(function (s, t) {
|
||||
return distance(s, t, props, norm) * MULTIPLIER;
|
||||
})
|
||||
.neighbourSize(neighbourSize)
|
||||
.sampleSize(sampleSize))
|
||||
.nodes(nodes)
|
||||
.force("neighbourSampling", neighbourSamplingDistance()
|
||||
.neighbourSize(FullneighbourSize)
|
||||
.sampleSize(FullsampleSize)
|
||||
.distanceRange(FulldistanceRange)
|
||||
.distance(distance)
|
||||
.multiplier(MULTIPLIER)
|
||||
)
|
||||
.on("tick", function () {
|
||||
event.call("fullTick", fullSimulation);
|
||||
})
|
||||
.on("end", function () {
|
||||
event.call("end", fullSimulation);
|
||||
});
|
||||
})
|
||||
.nodes(nodes)
|
||||
.alpha(1).restart();
|
||||
}
|
||||
|
||||
return hybrid = {
|
||||
|
||||
Reference in New Issue
Block a user