Package georegression.struct
Class GeoTuple4D_F64<T extends GeoTuple4D_F64>
java.lang.Object
georegression.struct.GeoTuple<T>
georegression.struct.GeoTuple_F64<T>
georegression.struct.GeoTuple4D_F64<T>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Point4D_F64,Vector4D_F64
Generic Tuple for geometric objects that store (x,y,z,w)
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedGeoTuple4D_F64(double x, double y, double z, double w) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoubledistance(double x, double y, double z, double w) doubledoubledistance2(double x, double y, double z, double w) doublevoiddivideIP(double scalar) booleanintThe dimensionality of space the tuple is contained in and the number of values it has.doublegetIdx(int index) Returns the value of the tuple along the specified coordinate system axis.inthashCode()booleanisIdentical(double x, double y, double z, double w) booleanisIdentical(double x, double y, double z, double w, double tol) booleanisIdentical(GeoTuple4D_F64 t, double tol) Checks to see if the two GeoTuple have values which are nearly the same.booleanisNaN()Returns true if at least one value is NaNdoublemaxAbs()Returns the absolute value of the component with the largest absolute valuedoublenorm()Computes the Euclidean norm.voiddoublenormSq()Computes the square of the Euclidean norm.voidIn-place additionvoidprint()voidscale(double scalar) voidsetIdx(int index, double value) setTo(double x, double y, double z, double w) setTo(GeoTuple3D_F64<?> p, double w) Sets this equal to 'src'times(double scalar) voidtimesIP(double scalar) In-place scalar multiplicationprotected Stringvoidzero()Sets all coefficients and parameters to zero, which is typically the initial state.Methods inherited from class georegression.struct.GeoTuple_F64
copy, isInfiniteMethods inherited from class georegression.struct.GeoTuple
createNewInstance
-
Field Details
-
x
public double x -
y
public double y -
z
public double z -
w
public double w
-
-
Constructor Details
-
GeoTuple4D_F64
protected GeoTuple4D_F64(double x, double y, double z, double w) -
GeoTuple4D_F64
protected GeoTuple4D_F64()
-
-
Method Details
-
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 GeoTuple4D_F64>- Returns:
- Dimensionality of the object.
-
_setTo
-
setTo
-
setTo
-
zero
public void zero()Description copied from class:GeoTupleSets all coefficients and parameters to zero, which is typically the initial state.- Specified by:
zeroin classGeoTuple<T extends GeoTuple4D_F64>
-
isIdentical
public boolean isIdentical(double x, double y, double z, double w) -
isIdentical
public boolean isIdentical(double x, double y, double z, double w, double tol) -
isIdentical
Description copied from class:GeoTuple_F64Checks 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_F64<T extends GeoTuple4D_F64>- 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.
-
getIdx
public double getIdx(int index) Description copied from class:GeoTuple_F64Returns the value of the tuple along the specified coordinate system axis.- Specified by:
getIdxin classGeoTuple_F64<T extends GeoTuple4D_F64>- Parameters:
index- Which axis in the coordinate system.- Returns:
- Its value.
-
setIdx
public void setIdx(int index, double value) - Specified by:
setIdxin classGeoTuple_F64<T extends GeoTuple4D_F64>
-
scale
public void scale(double scalar) -
plusIP
In-place addition
this.x = this.x + a.x;- Parameters:
a- value which is to be added
-
times
-
timesIP
public void timesIP(double scalar) In-place scalar multiplication- Parameters:
scalar- value that it is multiplied by
-
divideIP
public void divideIP(double scalar) -
normalize
public void normalize() -
norm
public double norm()Description copied from class:GeoTuple_F64Computes the Euclidean norm.- Overrides:
normin classGeoTuple_F64<T extends GeoTuple4D_F64>- Returns:
- norm.
-
normSq
public double normSq()Description copied from class:GeoTuple_F64Computes the square of the Euclidean norm.- Overrides:
normSqin classGeoTuple_F64<T extends GeoTuple4D_F64>- Returns:
- norm squared.
-
distance
- Overrides:
distancein classGeoTuple_F64<T extends GeoTuple4D_F64>
-
distance
public double distance(double x, double y, double z, double w) -
distance2
- Overrides:
distance2in classGeoTuple_F64<T extends GeoTuple4D_F64>
-
distance2
public double distance2(double x, double y, double z, double w) -
print
public void print() -
isNaN
public boolean isNaN()Description copied from class:GeoTuple_F64Returns true if at least one value is NaN- Overrides:
isNaNin classGeoTuple_F64<T extends GeoTuple4D_F64>
-
maxAbs
public double maxAbs()Returns the absolute value of the component with the largest absolute value- Returns:
- max absolute value
-
setTo
Description copied from class:GeoTupleSets this equal to 'src'- Specified by:
setToin classGeoTuple<T extends GeoTuple4D_F64>- Parameters:
src- The tuple being copied- Returns:
- Reference to 'this' class instance. Used to chain operations.
-
equals
- Overrides:
equalsin classGeoTuple_F64<T extends GeoTuple4D_F64>
-
toString
-
hashCode
public int hashCode()- Overrides:
hashCodein classGeoTuple_F64<T extends GeoTuple4D_F64>
-