Package elki.data.spatial
Class PolygonsObject
- java.lang.Object
-
- elki.data.spatial.PolygonsObject
-
- All Implemented Interfaces:
SpatialComparable
public class PolygonsObject extends java.lang.Object implements SpatialComparable
Object representation consisting of (multiple) polygons.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<Polygon>polygonsThe polygonsstatic PolygonsObjectPROTOTYPEStatic (empty) prototype
-
Constructor Summary
Constructors Constructor Description PolygonsObject(java.util.Collection<Polygon> polygons)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendToBuffer(java.lang.StringBuilder buf)Append polygons to the buffer.intgetDimensionality()Returns the dimensionality of the object.doublegetMax(int dimension)Returns the maximum coordinate at the specified dimension.doublegetMin(int dimension)Returns the minimum coordinate at the specified dimension.java.util.Collection<Polygon>getPolygons()Access the polygon data.java.lang.StringtoString()
-
-
-
Field Detail
-
PROTOTYPE
public static final PolygonsObject PROTOTYPE
Static (empty) prototype
-
polygons
private java.util.Collection<Polygon> polygons
The polygons
-
-
Constructor Detail
-
PolygonsObject
public PolygonsObject(java.util.Collection<Polygon> polygons)
Constructor.- Parameters:
polygons- Polygons
-
-
Method Detail
-
getPolygons
public java.util.Collection<Polygon> getPolygons()
Access the polygon data.- Returns:
- Polygon collection
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
appendToBuffer
public void appendToBuffer(java.lang.StringBuilder buf)
Append polygons to the buffer.- Parameters:
buf- Buffer to append to
-
getDimensionality
public int getDimensionality()
Description copied from interface:SpatialComparableReturns the dimensionality of the object.- Specified by:
getDimensionalityin interfaceSpatialComparable- Returns:
- the dimensionality
-
getMin
public double getMin(int dimension)
Description copied from interface:SpatialComparableReturns the minimum coordinate at the specified dimension.- Specified by:
getMinin interfaceSpatialComparable- Parameters:
dimension- the dimension for which the coordinate should be returned, where 0 ≤ dimension <getDimensionality()- Returns:
- the minimum coordinate at the specified dimension
-
getMax
public double getMax(int dimension)
Description copied from interface:SpatialComparableReturns the maximum coordinate at the specified dimension.- Specified by:
getMaxin interfaceSpatialComparable- Parameters:
dimension- the dimension for which the coordinate should be returned, where 0 ≤ dimension <getDimensionality()- Returns:
- the maximum coordinate at the specified dimension
-
-