georegression.struct.point
Class Point2D_I32
- java.lang.Object
-
- georegression.struct.GeoTuple<Point2D_I32>
-
- georegression.struct.point.Point2D_I32
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- Match, PointIndex_I32
public class Point2D_I32 extends GeoTuple<Point2D_I32>
An integer 2D point- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Point2D_I32()Point2D_I32(int x, int y)Point2D_I32(Point2D_I32 orig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Point2D_I32copy()Generic copy routine.Point2D_I32createNewInstance()Creates a new tuple instance of the same type.doubledistance(Point2D_I32 a)intdistance2(Point2D_I32 a)Returns the Euclidean distance squared from 'this' to 'a'.intgetDimension()The dimensionality of space the tuple is contained in and the number of values it has.intgetX()intgetY()voidset(int x, int y)voidset(Point2D_I32 v)voidsetX(int x)voidsetY(int y)java.lang.StringtoString()
-
-
-
Constructor Detail
-
Point2D_I32
public Point2D_I32(int x, int y)
-
Point2D_I32
public Point2D_I32(Point2D_I32 orig)
-
Point2D_I32
public Point2D_I32()
-
-
Method Detail
-
set
public void set(Point2D_I32 v)
-
set
public void set(int x, int y)
-
setX
public void setX(int x)
-
setY
public void setY(int y)
-
getX
public final int getX()
-
getY
public final int getY()
-
distance
public double distance(Point2D_I32 a)
-
distance2
public int distance2(Point2D_I32 a)
Returns the Euclidean distance squared from 'this' to 'a'. No floating point operations are used.
d2 = (this.x-a.x)2 + (this.y-a.y)2
- Parameters:
a- Point that distance is computed from.- Returns:
- Euclidean distance squared.
-
copy
public Point2D_I32 copy()
Description copied from class:GeoTupleGeneric copy routine. It is recommended that this be overridden with a faster implementation.- Specified by:
copyin classGeoTuple<Point2D_I32>- Returns:
- An exact copy of this GeoTuple.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDimension
public int getDimension()
Description copied from class:GeoTupleThe dimensionality of space the tuple is contained in and the number of values it has.- Specified by:
getDimensionin classGeoTuple<Point2D_I32>- Returns:
- Dimensionality of the object.
-
createNewInstance
public Point2D_I32 createNewInstance()
Description copied from class:GeoTupleCreates a new tuple instance of the same type.
- Specified by:
createNewInstancein classGeoTuple<Point2D_I32>- Returns:
- new tuple instance.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG