package voronoi; import helper.ListBTS; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import DataStructure.GSMMap; import DataStructure.SingleBTS; public class sweepLineVD { private GSMMap map; // private ArrayList pointmap = new ArrayList(); /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub } public sweepLineVD(GSMMap map) { this.map = map; } public void interpolate() { SingleBTS[] btscontent = map.content(); for (SingleBTS extrapolateThis : btscontent) { doVoronoi(extrapolateThis); } } private void doVoronoi(SingleBTS extrapolateThis) { // extract only x/y points out of gsmmap with this arfcn List pointmap = getPointMap(extrapolateThis); // start voronoi sweep now and build voronoi diagram voronoisweep(pointmap); } @SuppressWarnings("unused") private void voronoisweep(List pointmap) { // sweepline from y=0 to max(y) double sweepline = 0; } private List getPointMap(SingleBTS extrapolateThis) { // have mappoint sorted for x-coordinates ArrayList pointmap = new ArrayList(); for (int x = 0; x < map.Xcoords.length; x++) { for (int y = 0; y < map.Ycoords.length; y++) { if (ListBTS.contains(map.map[x][y], extrapolateThis)) { pointmap.add(new Point2D.Double(x, y)); } } } return pointmap; } } /* * class Point { public double x; public double y; * * public Point(double x, double y) { this.x = x; this.y = y; } } class Line { * * } */