public class DistanceComparable<T> extends Object implements Comparable<DistanceComparable>
NearestNeighborsSearch
.Modifier and Type | Field and Description |
---|---|
protected Float |
distance |
protected boolean |
lowestDistanceIsClosest |
protected T |
object |
protected Object |
property |
Constructor and Description |
---|
DistanceComparable(T object,
double distance,
boolean lowestDistanceIsClosest) |
DistanceComparable(T object,
Float distance,
Object property,
boolean lowestDistanceIsClosest) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DistanceComparable o) |
boolean |
equals(Object obj) |
Float |
getDistance() |
T |
getObject() |
Object |
getProperty() |
boolean |
isLowestDistanceIsClosest() |
void |
setDistance(Float distance) |
void |
setLowestDistanceIsClosest(boolean lowestDistanceIsClosest) |
void |
setObject(T object) |
void |
setProperty(Object property)
Property to be predicted by nearest neighbors (e.g.
|
String |
toString() |
protected T object
protected Float distance
protected Object property
protected boolean lowestDistanceIsClosest
public DistanceComparable(T object, double distance, boolean lowestDistanceIsClosest)
public int compareTo(DistanceComparable o)
compareTo
in interface Comparable<DistanceComparable>
public Float getDistance()
public void setDistance(Float distance)
public T getObject()
public void setObject(T object)
public boolean isLowestDistanceIsClosest()
public void setLowestDistanceIsClosest(boolean lowestDistanceIsClosest)
public Object getProperty()
public void setProperty(Object property)
property
- Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.