Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added back missing code.
  • Loading branch information
Andrew Lawson authored and Andrew Lawson committed Nov 29, 2014
1 parent 3ac9d9b commit ee4cce2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions geometric_separators.pde
Expand Up @@ -44,6 +44,31 @@ void mousePressed() {
redraw();
}

// Estimate centerpoint
void approxCenter(ArrayList<PShape> input) {
if (input.size() == 1) {
// Do nothing
}
else {
// Sample points

}
}

// Estimate the geometric median - dynamic programming
void geomMedian() {
// Memoization hash tables
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>();
ArrayList<Double> upSq = new ArrayList<Double>();
ArrayList<Double> downSq = new ArrayList<Double>();
}

// Draw
void draw() {
background(255);
Expand Down

0 comments on commit ee4cce2

Please sign in to comment.