Interpolation expose ending refinement interations to othre fn
This commit is contained in:
@@ -22,7 +22,7 @@ import {placeNearToNearestNeighbour} from "./interpCommon";
|
||||
* @param {number} endingIts - for phase 3, how many iterations to refine the
|
||||
* placement of each interpolated point
|
||||
*/
|
||||
export default function(sampleSet, remainderSet, numPivots, distanceFn) {
|
||||
export default function(sampleSet, remainderSet, numPivots, distanceFn, endingIts) {
|
||||
// Pivot based parent finding
|
||||
let numBuckets = Math.floor(Math.sqrt(sampleSet.length));
|
||||
let sets = takeSampleFrom(sampleSet, numPivots);
|
||||
@@ -126,6 +126,6 @@ export default function(sampleSet, remainderSet, numPivots, distanceFn) {
|
||||
if (sampleSubsetDistanceCache[k] === undefined)
|
||||
sampleSubsetDistanceCache[k] = distanceFn(node, sampleSubset[k]);
|
||||
}
|
||||
placeNearToNearestNeighbour(node, nearSample, minDist, sampleSubset, sampleSubsetDistanceCache);
|
||||
placeNearToNearestNeighbour(node, nearSample, minDist, sampleSubset, sampleSubsetDistanceCache, endingIts);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user