Created
March 29, 2013 11:07
-
-
Save dfilimon/5270234 to your computer and use it in GitHub Desktop.
ConcurrentModificationException from Multinomial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Re-weight everything according to the minimum distance to a seed. | |
for (int currSeedIndex : seedSelector) { | |
WeightedVector curr = datapoints.get(currSeedIndex); | |
double newWeight = nextSeed.getWeight() * distanceMeasure.distance(nextSeed, curr); | |
if (newWeight < seedSelector.getWeight(currSeedIndex)) { | |
seedSelector.set(currSeedIndex, newWeight); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment