All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.khelekore.prtree.DistanceResult Maven / Gradle / Ivy

There is a newer version: 1.11
Show newest version
package org.khelekore.prtree;

/** Class to hold object and distance to it
 * @param  The node type
 */
public class DistanceResult {
    private final T t;
    private final double dist;
    
    /** Create a new DistanceResult with a given object and distance
     * @param t the object we are measuring the distance to
     * @param dist the actual distance to the object
     */
    public DistanceResult (T t, double dist) {
	this.t = t;
	this.dist = dist;
    }

    /** Get the object
     * @return The node object
     */
    public T get () {
	return t;
    }

    /** Get the distance
     * @return The distance to the node object
     */
    public double getDistance () {
	return dist;
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy