Package org.robwork.sdurw_math
Class MetricVector3D
- java.lang.Object
-
- org.robwork.sdurw_math.MetricVector3D
-
- Direct Known Subclasses:
EuclideanMetricVector3D,InfinityMetricVector3D,ManhattanMetricVector3D,WeightedEuclideanMetricVector3D,WeightedInfinityMetricVector3D,WeightedManhattenMetricVector3D
public class MetricVector3D extends java.lang.ObjectTemplate interface for metrics on type T.
A metric is a function that defines a scalar distance between elements.
-
-
Constructor Summary
Constructors Constructor Description MetricVector3D(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()doubledistance(Vector3D q)The distance from the zero element to qdoubledistance(Vector3D a, Vector3D b)The distance from element a to b.static longgetCPtr(MetricVector3D obj)intsize()The dimension of elements on which this metric operates.
The returns -1 if the elements don't have a measure of dimension or
if the metric works for elements of all dimensions.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(MetricVector3D obj)
-
delete
public void delete()
-
distance
public double distance(Vector3D q)
The distance from the zero element to q
-
distance
public double distance(Vector3D a, Vector3D b)
The distance from element a to b.- Parameters:
a- [in] first elementb- [in] second element- Returns:
- the distance
-
size
public int size()
The dimension of elements on which this metric operates.
The returns -1 if the elements don't have a measure of dimension or
if the metric works for elements of all dimensions.
-
-