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>
polygons
The polygonsstatic PolygonsObject
PROTOTYPE
Static (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 void
appendToBuffer(java.lang.StringBuilder buf)
Append polygons to the buffer.int
getDimensionality()
Returns the dimensionality of the object.double
getMax(int dimension)
Returns the maximum coordinate at the specified dimension.double
getMin(int dimension)
Returns the minimum coordinate at the specified dimension.java.util.Collection<Polygon>
getPolygons()
Access the polygon data.java.lang.String
toString()
-
-
-
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:
toString
in 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:SpatialComparable
Returns the dimensionality of the object.- Specified by:
getDimensionality
in interfaceSpatialComparable
- Returns:
- the dimensionality
-
getMin
public double getMin(int dimension)
Description copied from interface:SpatialComparable
Returns the minimum coordinate at the specified dimension.- Specified by:
getMin
in 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:SpatialComparable
Returns the maximum coordinate at the specified dimension.- Specified by:
getMax
in interfaceSpatialComparable
- Parameters:
dimension
- the dimension for which the coordinate should be returned, where 0 ≤ dimension <getDimensionality()
- Returns:
- the maximum coordinate at the specified dimension
-
-