Package org.robwork.sdurw
Class MetricQ
- java.lang.Object
- 
- org.robwork.sdurw.MetricQ
 
- 
 public class MetricQ extends java.lang.ObjectTemplate interface for metrics on type T.
 
 A metric is a function that defines a scalar distance between elements.
- 
- 
Constructor SummaryConstructors Constructor Description MetricQ(long cPtr, boolean cMemoryOwn)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()doubledistance(Q q)The distance from the zero element to qdoubledistance(Q a, Q b)The distance from element a to b.
 static longgetCPtr(MetricQ 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- 
getCPtrpublic static long getCPtr(MetricQ obj) 
 - 
deletepublic void delete() 
 - 
distancepublic double distance(Q q) The distance from the zero element to q
 - 
distancepublic double distance(Q a, Q b) The distance from element a to b.
 - Parameters:
- a- [in] first element
- b- [in] second element
- Returns:
- the distance
 
 - 
sizepublic 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.
 
- 
 
-