at.tuwien.ifs.somtoolbox.clustering
Class TwoDimensionalClusterShapeStats

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.clustering.TwoDimensionalClusterShapeStats

public class TwoDimensionalClusterShapeStats
extends Object

This class collects stats about the shape of 2-dimensional clusters

Version:
$Id: TwoDimensionalClusterShapeStats.java 4202 2011-03-28 16:21:18Z mayer $
Author:
Rudolf Mayer

Field Summary
(package private)  int maxX
           
(package private)  int maxY
           
(package private)  int minX
           
(package private)  int minY
           
(package private)  int unitCount
           
 
Constructor Summary
TwoDimensionalClusterShapeStats()
           
 
Method Summary
 void addPoint(int x, int y)
          Add one point to the cluster stats
 double getBoundingBoxRatio()
          Get the ratio of getStretchX() and getStretchY()
 double getFilledRatio()
           
 int getMaxX()
           
 int getMaxY()
           
 int getMinX()
           
 int getMinY()
           
private  int getStretchX()
           
private  int getStretchY()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxX

int maxX

maxY

int maxY

minX

int minX

minY

int minY

unitCount

int unitCount
Constructor Detail

TwoDimensionalClusterShapeStats

public TwoDimensionalClusterShapeStats()
Method Detail

addPoint

public void addPoint(int x,
                     int y)
Add one point to the cluster stats


getBoundingBoxRatio

public double getBoundingBoxRatio()
Get the ratio of getStretchX() and getStretchY()


getStretchY

private int getStretchY()
Returns:
The stretch along the vertical axis.

getStretchX

private int getStretchX()
Returns:
The stretch along the horizontal axis

getFilledRatio

public double getFilledRatio()

getMinX

public int getMinX()
Returns:
Returns the minX point, i.e. the X-coordinate of the upper-left corner

getMinY

public int getMinY()
Returns:
Returns the minY point, i.e. the Y-coordinate of the upper-left corner

getMaxX

public int getMaxX()
Returns:
Returns the maxX point, i.e. X-coordinate of the lower-right corner

getMaxY

public int getMaxY()
Returns:
Returns the maxY point, i.e. Y-coordinate of the lower-right corner