เปลี่ยนค่าเริ่มต้นสำหรับ neighbour

This commit is contained in:
Pitchaya Boonsarngsuk
2018-02-02 10:16:27 +00:00
parent e330b029d7
commit 0fe075d4ba
4 changed files with 20 additions and 20 deletions

View File

@@ -147,14 +147,14 @@
<br/>
<label title="NeighbourSize">
Subset: Neighbour Set
<output id="hlneighbourSizeSliderOutput">6</output><br/>
<input type="range" min="1" max="100" value="6" step="1" oninput="d3.select('#hlneighbourSizeSliderOutput').text(value); NEIGHBOUR_SIZE=value;">
<output id="hlneighbourSizeSliderOutput">10</output><br/>
<input type="range" min="1" max="100" value="10" step="1" oninput="d3.select('#hlneighbourSizeSliderOutput').text(value); NEIGHBOUR_SIZE=value;">
</label>
<br/>
<label title="SampleSize">
Subset: Sample Set
<output id="hlsampleSizeSliderOutput">3</output><br/>
<input type="range" min="1" max="100" value="3" step="1" oninput="d3.select('#hlsampleSizeSliderOutput').text(value); SAMPLE_SIZE=value;">
<output id="hlsampleSizeSliderOutput">10</output><br/>
<input type="range" min="1" max="100" value="10" step="1" oninput="d3.select('#hlsampleSizeSliderOutput').text(value); SAMPLE_SIZE=value;">
</label>
<br/>
<label title="InterpEndingIts">
@@ -171,14 +171,14 @@
<br/>
<label title="Full NeighbourSize">
Full: Neighbour Set
<output id="hlFullneighbourSizeSliderOutput">6</output><br/>
<input type="range" min="1" max="100" value="6" step="1" oninput="d3.select('#hlFullneighbourSizeSliderOutput').text(value); FULL_NEIGHBOUR_SIZE=value;">
<output id="hlFullneighbourSizeSliderOutput">10</output><br/>
<input type="range" min="1" max="100" value="10" step="1" oninput="d3.select('#hlFullneighbourSizeSliderOutput').text(value); FULL_NEIGHBOUR_SIZE=value;">
</label>
<br/>
<label title="Full SampleSize">
Full: Sample Set
<output id="hlFullsampleSizeSliderOutput">3</output><br/>
<input type="range" min="1" max="100" value="3" step="1" oninput="d3.select('#hlFullsampleSizeSliderOutput').text(value); FULL_SAMPLE_SIZE=value;">
<output id="hlFullsampleSizeSliderOutput">10</output><br/>
<input type="range" min="1" max="100" value="10" step="1" oninput="d3.select('#hlFullsampleSizeSliderOutput').text(value); FULL_SAMPLE_SIZE=value;">
</label>
</div>
@@ -187,14 +187,14 @@
<div id="NSParameters" class="parameters" style="display:none">
<label title="NeighbourSize">
Neighbour Set
<output id="neighbourSizeSliderOutput">6</output><br/>
<input type="range" min="1" max="100" value="6" step="1" oninput="d3.select('#neighbourSizeSliderOutput').text(value); NEIGHBOUR_SIZE=value;">
<output id="neighbourSizeSliderOutput">10</output><br/>
<input type="range" min="1" max="100" value="10" step="1" oninput="d3.select('#neighbourSizeSliderOutput').text(value); NEIGHBOUR_SIZE=value;">
</label>
<br/>
<label title="SampleSize">
Sample Set
<output id="sampleSizeSliderOutput">3</output><br/>
<input type="range" min="1" max="100" value="3" step="1" oninput="d3.select('#sampleSizeSliderOutput').text(value); SAMPLE_SIZE=value;">
<output id="sampleSizeSliderOutput">10</output><br/>
<input type="range" min="1" max="100" value="10" step="1" oninput="d3.select('#sampleSizeSliderOutput').text(value); SAMPLE_SIZE=value;">
</label>
</div>
<input class="noParameters" type="radio" name="algorithm" onclick="d3.select('#startSimulation').on('click', startLinkSimulation); tweakedVerOfLink=false;">Link force in D3<br>

View File

@@ -50,16 +50,16 @@ var nodes, // as in Data points
var MULTIPLIER = 50,
PERPLEXITY = 30,
LEARNING_RATE = 10,
NEIGHBOUR_SIZE = 6,
SAMPLE_SIZE = 3,
NEIGHBOUR_SIZE = 10,
SAMPLE_SIZE = 10,
PIVOTS = false,
NUM_PIVOTS = 3,
ITERATIONS = 300,
FULL_ITERATIONS = 20,
NODE_SIZE = 10,
COLOR_ATTRIBUTE = "",
FULL_NEIGHBOUR_SIZE = 6,
FULL_SAMPLE_SIZE = 3,
FULL_NEIGHBOUR_SIZE = 10,
FULL_SAMPLE_SIZE = 10,
INTERP_ENDING_ITS = 20;
// Create a color scheme for a range of numbers.

View File

@@ -13,12 +13,12 @@ function startHybridSimulation() {
return distanceFunction(s, t, props, norm);
}
let forceSample = d3.forceNeighbourSamplingDistance()
let forceSample = d3.forceNeighbourSampling()
.neighbourSize(NEIGHBOUR_SIZE)
.sampleSize(SAMPLE_SIZE)
.distance(distance)
let forceFull = d3.forceNeighbourSamplingDistance()
let forceFull = d3.forceNeighbourSampling()
.neighbourSize(FULL_NEIGHBOUR_SIZE)
.sampleSize(FULL_SAMPLE_SIZE)
.distance(distance)

View File

@@ -16,8 +16,8 @@ export default function () {
var neighbours = [],
distance = constant(300),
nodes,
neighbourSize = 6,
sampleSize = 3,
neighbourSize = 10,
sampleSize = 10,
stableVelocity = 0,
stableVeloHandler = null,
dataSizeFactor;