Loading Point.javadeleted 100644 → 0 +0 −22 Original line number Diff line number Diff line public class Point { // index static int count = 0; // members final float x; final float y; final float z; final int idx; public Point(float xx, float yy, float zz){ this.x = xx; this.y = yy; this.z = zz; this.idx = count++; } public static boolean equals(Point aa, Point bb, float err){ return (aa.x - bb.x < err) && (aa.y - bb.y < err) && (aa.z - bb.z < err); } } layout.md 0 → 100644 +14 −0 Original line number Diff line number Diff line Point: single feature - modify x,y,z coordinates - pointer to rep(s) UnionFind: group of objects --> from database - make-set > instantiate HashSet of points - find-set > return list of k reps - union > combine two sets - union-find > find and union together ObjectMart: disjoint set operations, that gets coordinates from source - just a main function? - getObject > get new set of coordinates, make-set on them, try union-find vslam/ObjectMart.java 0 → 100644 +17 −0 Original line number Diff line number Diff line package vslam; public class ObjectMart { UnionFind objects = new UnionFind(); public static void main(String[] args){ /* infinite loop of running system: 1) Get new info from system 2) Update UnionFind 3) Push new update to database if necessary */ } } vslam/Point.java 0 → 100644 +76 −0 Original line number Diff line number Diff line package vslam; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; public class Point { // index static int count = 0; // members private float x; private float y; private float z; final int idx; private Set<Point> reps; // METHODS /* Object Constructor of a feature in 3D */ public Point(float xx, float yy, float zz){ this.x = xx; this.y = yy; this.z = zz; this.idx = count++; this.reps = new HashSet<>(); } /* Check if two points are in similar area, within margin of epsilon (err) */ public static boolean equals(Point aa, Point bb, float err){ return (aa.x - bb.x < err) && (aa.y - bb.y < err) && (aa.z - bb.z < err); } // GETTERS AND SETTERS BELOW HERE public void addRep(Point rr){ this.reps.add(rr); } public Set<Point> getReps() {return this.reps; } public boolean deleteRep(Point rr){ return this.reps.remove(rr); } public float getX() { return x; } public float getY() { return y; } public float getZ() { return z; } public void setX(float xx){ this.x = xx; } public void setY(float yy){ this.y = yy; } public void setZ(float zz){ this.z = zz; } } PointSet.java→vslam/PointSet.java +41 −0 Original line number Diff line number Diff line import java.util.ArrayList; import java.util.Arrays; import java.util.List; package vslam; import java.util.*; public class PointSet { List<Point> pset; Set<Point> pset; public PointSet(Point ...pp){ pset = new ArrayList<>(); pset = new HashSet<>(); // add every point blankly to pointset pset.addAll(Arrays.asList(pp)); Loading @@ -16,6 +17,25 @@ public class PointSet { pset.add(p); } public boolean public void addAll(Point ...p) { Collections.addAll(pset, p); } public void addAll(List<Point> p) { pset.addAll(p); } public Set<Point> getSetReps(){ Point p = pset.iterator().next(); return p.getReps(); } public List<Point> getPoints(){ return new ArrayList<>(pset); } public boolean updateReps(){ return true; } } Loading
Point.javadeleted 100644 → 0 +0 −22 Original line number Diff line number Diff line public class Point { // index static int count = 0; // members final float x; final float y; final float z; final int idx; public Point(float xx, float yy, float zz){ this.x = xx; this.y = yy; this.z = zz; this.idx = count++; } public static boolean equals(Point aa, Point bb, float err){ return (aa.x - bb.x < err) && (aa.y - bb.y < err) && (aa.z - bb.z < err); } }
layout.md 0 → 100644 +14 −0 Original line number Diff line number Diff line Point: single feature - modify x,y,z coordinates - pointer to rep(s) UnionFind: group of objects --> from database - make-set > instantiate HashSet of points - find-set > return list of k reps - union > combine two sets - union-find > find and union together ObjectMart: disjoint set operations, that gets coordinates from source - just a main function? - getObject > get new set of coordinates, make-set on them, try union-find
vslam/ObjectMart.java 0 → 100644 +17 −0 Original line number Diff line number Diff line package vslam; public class ObjectMart { UnionFind objects = new UnionFind(); public static void main(String[] args){ /* infinite loop of running system: 1) Get new info from system 2) Update UnionFind 3) Push new update to database if necessary */ } }
vslam/Point.java 0 → 100644 +76 −0 Original line number Diff line number Diff line package vslam; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; public class Point { // index static int count = 0; // members private float x; private float y; private float z; final int idx; private Set<Point> reps; // METHODS /* Object Constructor of a feature in 3D */ public Point(float xx, float yy, float zz){ this.x = xx; this.y = yy; this.z = zz; this.idx = count++; this.reps = new HashSet<>(); } /* Check if two points are in similar area, within margin of epsilon (err) */ public static boolean equals(Point aa, Point bb, float err){ return (aa.x - bb.x < err) && (aa.y - bb.y < err) && (aa.z - bb.z < err); } // GETTERS AND SETTERS BELOW HERE public void addRep(Point rr){ this.reps.add(rr); } public Set<Point> getReps() {return this.reps; } public boolean deleteRep(Point rr){ return this.reps.remove(rr); } public float getX() { return x; } public float getY() { return y; } public float getZ() { return z; } public void setX(float xx){ this.x = xx; } public void setY(float yy){ this.y = yy; } public void setZ(float zz){ this.z = zz; } }
PointSet.java→vslam/PointSet.java +41 −0 Original line number Diff line number Diff line import java.util.ArrayList; import java.util.Arrays; import java.util.List; package vslam; import java.util.*; public class PointSet { List<Point> pset; Set<Point> pset; public PointSet(Point ...pp){ pset = new ArrayList<>(); pset = new HashSet<>(); // add every point blankly to pointset pset.addAll(Arrays.asList(pp)); Loading @@ -16,6 +17,25 @@ public class PointSet { pset.add(p); } public boolean public void addAll(Point ...p) { Collections.addAll(pset, p); } public void addAll(List<Point> p) { pset.addAll(p); } public Set<Point> getSetReps(){ Point p = pset.iterator().next(); return p.getReps(); } public List<Point> getPoints(){ return new ArrayList<>(pset); } public boolean updateReps(){ return true; } }