Clean up old codes 3
This commit is contained in:
@@ -91,22 +91,9 @@ function processData(data, error) {
|
|||||||
if (error) throw error.message;
|
if (error) throw error.message;
|
||||||
|
|
||||||
nodes = data;
|
nodes = data;
|
||||||
|
|
||||||
// Number of iterations before stopping.
|
|
||||||
size = nodes.length;
|
size = nodes.length;
|
||||||
|
|
||||||
console.log("Number of iterations: ", ITERATIONS);
|
|
||||||
|
|
||||||
// Start by placing the nodes at the center (its starting positions).
|
|
||||||
simulation = d3.forceSimulation();
|
simulation = d3.forceSimulation();
|
||||||
|
|
||||||
//Put the nodes in random starting positions
|
|
||||||
nodes.forEach(function (d) {
|
|
||||||
d.x = (Math.random()-0.5) * 100000;
|
|
||||||
d.y = (Math.random()-0.5) * 100000;
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("n =", nodes.length);
|
|
||||||
// Calculate normalization arguments and get the list of
|
// Calculate normalization arguments and get the list of
|
||||||
// properties of the nodes.
|
// properties of the nodes.
|
||||||
norm = calculateNormalization(nodes); // Used with distance fn
|
norm = calculateNormalization(nodes); // Used with distance fn
|
||||||
|
|||||||
Reference in New Issue
Block a user