Interp almost-complete brute-force interpolation

This commit is contained in:
Pitchaya Boonsarngsuk
2018-01-16 21:24:47 +00:00
parent a615ef199d
commit 7b6b5e46c6
4 changed files with 82 additions and 94 deletions

View File

@@ -166,7 +166,7 @@
<label title="Number of iterations done at the end">
Full: Iterations
<output id="fullIterationsSliderOutput">20</output><br/>
<input type="range" min="1" max="100" value="20" step="1" oninput="d3.select('#fullIterationsSliderOutput').text(value); FULL_ITERATIONS=value;">
<input type="range" min="0" max="100" value="20" step="1" oninput="d3.select('#fullIterationsSliderOutput').text(value); FULL_ITERATIONS=value;">
</label>
<br/>
<label title="Full NeighbourSize">

View File

@@ -297,16 +297,21 @@ function startHybridSimulation() {
simulation.stop();
p1 = performance.now();
hybridSimulation = d3.hybridSimulation(nodes);
hybridSimulation
.multiplier(MULTIPLIER)
.sampleIterations(ITERATIONS)
.pivots(PIVOTS)
.numPivots(NUM_PIVOTS)
.fullIterations(FULL_ITERATIONS)
.neighbourSize(NEIGHBOUR_SIZE)
configuration = {
iteration: ITERATIONS,
neighbourSize: NEIGHBOUR_SIZE,
sampleSize: SAMPLE_SIZE,
distanceRange: SELECTED_DISTANCE * MULTIPLIER,
fullIterations: FULL_ITERATIONS,
fullNeighbourSize: FULL_NEIGHBOUR_SIZE,
fullSampleSize: FULL_SAMPLE_SIZE,
fullDistanceRange: FULL_SELECTED_DISTANCE * MULTIPLIER,
distanceFn: function (s, t) {return distanceFunction(s, t, props, norm) * MULTIPLIER;},
pivots: PIVOTS,
numPivots: NUM_PIVOTS
};
.sampleSize(SAMPLE_SIZE);
hybridSimulation = d3.hybridSimulation(nodes, configuration);
let sample = hybridSimulation.sample();
let remainder = hybridSimulation.remainder();