georegression.struct
Class GeoTuple2D_F32<T extends GeoTuple2D_F32>
- java.lang.Object
-
- georegression.struct.GeoTuple<T>
-
- georegression.struct.GeoTuple_F32<T>
-
- georegression.struct.GeoTuple2D_F32<T>
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- Point2D_F32, Vector2D_F32
public abstract class GeoTuple2D_F32<T extends GeoTuple2D_F32> extends GeoTuple_F32<T>
Generic Tuple for geometric objects that store (x,y)- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description GeoTuple2D_F32()GeoTuple2D_F32(float x, float y)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description floatdistance(float x, float y)Euclidean distance from the pointfloatdistance(T t)floatdistance2(float x, float y)Euclidean squared distance from the pointfloatdistance2(T t)intgetDimension()The dimensionality of space the tuple is contained in and the number of values it has.floatgetIndex(int index)Returns the value of the tuple along the specified coordinate system axis.floatgetX()floatgetY()booleanisIdentical(float x, float y)booleanisIdentical(float x, float y, float tol)booleanisIdentical(T t, float tol)Checks to see if the two GeoTuple have values which are nearly the same.floatnorm()Computes the Euclidean norm.floatnormSq()Computes the square of the Euclidean norm.Tplus(GeoTuple2D_F32 a)AdditionvoidplusIP(GeoTuple2D_F32 a)In-place additionvoidprint()voidscale(float scalar)In-place scalar multiplicationvoidset(float x, float y)voidsetIndex(int index, float value)voidsetX(float x)voidsetY(float y)Ttimes(float scalar)Scalar multiplicationvoidtimesIP(float scalar)In-place scalar multiplication-
Methods inherited from class georegression.struct.GeoTuple_F32
copy
-
Methods inherited from class georegression.struct.GeoTuple
createNewInstance
-
-
-
-
Constructor Detail
-
GeoTuple2D_F32
public GeoTuple2D_F32(float x, float y)
-
GeoTuple2D_F32
public GeoTuple2D_F32()
-
-
Method Detail
-
set
public void set(float x, float y)
-
isIdentical
public boolean isIdentical(float x, float y)
-
isIdentical
public boolean isIdentical(float x, float y, float tol)
-
isIdentical
public boolean isIdentical(T t, float tol)
Description copied from class:GeoTuple_F32Checks to see if the two GeoTuple have values which are nearly the same. False is always returned if the dimension is different.- Overrides:
isIdenticalin classGeoTuple_F32<T extends GeoTuple2D_F32>- Parameters:
t- The GeoTuple it is being compared against.tol- How similar each element must be for them to be considered identical.- Returns:
- if they are identical or not.
-
setX
public void setX(float x)
-
setY
public void setY(float y)
-
getX
public float getX()
-
getY
public float getY()
-
plusIP
public void plusIP(GeoTuple2D_F32 a)
In-place addition
this.x = this.x + a.x;- Parameters:
a- value which is to be added
-
plus
public T plus(GeoTuple2D_F32 a)
Addition
ret.x = this.x + a.x;- Parameters:
a- value which is to be added
-
timesIP
public void timesIP(float scalar)
In-place scalar multiplication- Parameters:
scalar- value that it is multiplied by
-
scale
public void scale(float scalar)
In-place scalar multiplication- Parameters:
scalar- value that it is multiplied by
-
times
public T times(float scalar)
Scalar multiplication- Parameters:
scalar- value which is it multiplied by- Returns:
- new matrix which is the original scaled
-
distance
public float distance(float x, float y)Euclidean distance from the point- Parameters:
x- x-coordinatey- y-coordinate- Returns:
- distance
-
distance2
public float distance2(float x, float y)Euclidean squared distance from the point- Parameters:
x- x-coordinatey- y-coordinate- Returns:
- distance squared
-
distance
public float distance(T t)
- Overrides:
distancein classGeoTuple_F32<T extends GeoTuple2D_F32>
-
distance2
public float distance2(T t)
- Overrides:
distance2in classGeoTuple_F32<T extends GeoTuple2D_F32>
-
getIndex
public float getIndex(int index)
Description copied from class:GeoTuple_F32Returns the value of the tuple along the specified coordinate system axis.- Specified by:
getIndexin classGeoTuple_F32<T extends GeoTuple2D_F32>- Parameters:
index- Which axis in the coordinate system.- Returns:
- Its value.
-
setIndex
public void setIndex(int index, float value)- Specified by:
setIndexin classGeoTuple_F32<T extends GeoTuple2D_F32>
-
norm
public float norm()
Description copied from class:GeoTuple_F32Computes the Euclidean norm.- Overrides:
normin classGeoTuple_F32<T extends GeoTuple2D_F32>- Returns:
- norm.
-
normSq
public float normSq()
Description copied from class:GeoTuple_F32Computes the square of the Euclidean norm.- Overrides:
normSqin classGeoTuple_F32<T extends GeoTuple2D_F32>- Returns:
- norm squared.
-
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<T extends GeoTuple2D_F32>- Returns:
- Dimensionality of the object.
-
print
public void print()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG