แก้ coding style ภาค 10
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Initialize the t-SNE algorithm and start simulation.
|
||||
*/
|
||||
function starttSNE() {
|
||||
function starttSNE () {
|
||||
springForce = false;
|
||||
simulation.stop();
|
||||
p1 = performance.now();
|
||||
@@ -25,20 +25,20 @@ function starttSNE() {
|
||||
/**
|
||||
* Initialize the Barnes-Hut algorithm and start simulation.
|
||||
*/
|
||||
function startBarnesHutSimulation() {
|
||||
console.log("startBarnesHutSimulation")
|
||||
function startBarnesHutSimulation () {
|
||||
console.log('startBarnesHutSimulation');
|
||||
alreadyRanIterations = 0;
|
||||
manualStop = false;
|
||||
springForce = false;
|
||||
p1 = performance.now();
|
||||
|
||||
simulation.alphaDecay(1 - Math.pow(0.001, 1 / ITERATIONS))
|
||||
.on("tick", ticked)
|
||||
.on("end", ended)
|
||||
.force(forceName, d3.forceBarnesHut()
|
||||
// The distance function that will be used to calculate distances
|
||||
// between nodes.
|
||||
.distance(function(s, t) { return distanceFunction(s, t, props, norm); }));
|
||||
.on('tick', ticked)
|
||||
.on('end', ended)
|
||||
.force(forceName, d3.forceBarnesHut()
|
||||
// The distance function that will be used to calculate distances
|
||||
// between nodes.
|
||||
.distance(function (s, t) { return distanceFunction(s, t, props, norm); }));
|
||||
// Restart the simulation.
|
||||
simulation.alpha(1).restart();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user