Quantum(type, maxNeighbors, maxThreshold, q1);
        }
    }

    function collectNearestNeighbors(type, maxThreshold) {
        var branchingCount = 0;
        for (var qi = 0; qi < track.analysis[type].length; qi++) {
            var q1 = track.analysis[type][qi];
            q1.neighbors = extractNearestNeighbors(q1, maxThreshold);
            if (q1.neighbors.length > 0) {
                branchingCount += 1;
            }
        }
        return branchingCount;
    }

    function extractNearestNeig