ProGAL.geom2d
Class PointSet

java.lang.Object
  extended by ProGAL.dataStructures.Set<Point>
      extended by ProGAL.geom2d.PointSet
All Implemented Interfaces:
java.lang.Iterable<Point>

public class PointSet
extends Set<Point>


Constructor Summary
PointSet()
           
PointSet(int n)
          creates a point set consisting of n uniformly distributed points in the unit square
 
Method Summary
 Point getCentroid()
           
 Point getNextExtremePoint(Point p)
          returns next extreme point of the point set (counterclockwise)
 Point leftExtremePoint()
          returns the leftmost point (in case of ties, the topmost one is returned
 int leftExtremePointIndx()
          returns the index of the leftmost point (in case of ties, index of the topmost one is returned)
 void toConsole(int dec)
          prints points on the console
 void translate(Vector v)
          translates all points by the specified vector
 
Methods inherited from class ProGAL.dataStructures.Set
append, append, binarySearch, clear, contains, delete, deleteFirst, deleteIndex, deleteLast, findIndex, get, getElements, getFirst, getLast, getSize, insert, isEmpty, isEqual, isMember, iterator, main, partition, randomPermutation, reverse, set, shift, sort, swap
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointSet

public PointSet()

PointSet

public PointSet(int n)
creates a point set consisting of n uniformly distributed points in the unit square

Method Detail

getCentroid

public Point getCentroid()

leftExtremePointIndx

public int leftExtremePointIndx()
returns the index of the leftmost point (in case of ties, index of the topmost one is returned)


leftExtremePoint

public Point leftExtremePoint()
returns the leftmost point (in case of ties, the topmost one is returned


getNextExtremePoint

public Point getNextExtremePoint(Point p)
returns next extreme point of the point set (counterclockwise)


translate

public void translate(Vector v)
translates all points by the specified vector


toConsole

public void toConsole(int dec)
prints points on the console