Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed HashMap issues.
  • Loading branch information
Andrew Lawson authored and Andrew Lawson committed Nov 29, 2014
1 parent dec9a90 commit efdedd5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions geometric_separators.pde
Expand Up @@ -47,7 +47,7 @@ void mousePressed() {
// Estimate centerpoint
void approxCenter(ArrayList<PShape> input) {
if (input.size() == 1) {
return ArrayList.get(0);
// Do nothing
}
else {
// Sample points
Expand All @@ -58,10 +58,10 @@ void approxCenter(ArrayList<PShape> input) {
// Estimate the geometric median - dynamic programming
void geomMedian() {
// Memoization hash tables
HashMap<Double> left = new HashMap<Double>():
HashMap<Double> right = new HashMap<Double>():
HashMap<Double> up = new HashMap<Double>():
HashMap<Double> down = new HashMap<Double>():
HashMap<String, Double> left = new HashMap<String, Double>();
HashMap<String, Double> right = new HashMap<String, Double>();
HashMap<String, Double> up = new HashMap<String, Double>();
HashMap<String, Double> down = new HashMap<String, Double>();
// Sum of squares values
ArrayList<Double> leftSq = new ArrayList<Double>();
ArrayList<Double> rightSq = new ArrayList<Double>();
Expand Down

0 comments on commit efdedd5

Please sign in to comment.