Modify comments, more non-functional code cleanup

This commit is contained in:
Pitchaya Boonsarngsuk
2018-01-31 21:11:10 +00:00
parent 0bfd613d9e
commit 961c94391c
4 changed files with 40 additions and 11 deletions

View File

@@ -2,10 +2,14 @@ import {pointOnCircle, takeSampleFrom} from "./helpers";
import {placeNearToNearestNeighbour} from "./interpCommon";
/**
* Perform interpolation where the nearest neighbour is found by brute-force.
* Perform interpolation where the "parent" node is found by brute-force.
* A "parent" of a node to be interpolated is a node whose position in 2D space
* is already known and have the least high-dimensional distance to the node in
* question.
* For each point to be interpolated:
* - Phase 1: find a nearest beighbour by comparing high-d distance against
each point already in the graph.
* - Phase 1: find the "parent" by comparing high-d distance against every
points already plotted on the graph.
this is essentially a nearest neighbour finding problem.
* - Phase 2 and 3 are passed onto placeNearToNearestNeighbour
* @param {list} sampleSet - nodes already plotted on the 2D graph
* @param {list} remainderSet - nodes to be interpolated onto the graph