com.venky.clustering.geography.GeoMetric Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Commonly used programming tasks in java
package com.venky.clustering.geography;
import com.venky.clustering.Metric;
import com.venky.geo.GeoDistance;
import com.venky.geo.GeoLocation;
public class GeoMetric implements Metric{
@Override
public double distance(GeoLocation p1, GeoLocation p2) {
return GeoDistance.distanceKms(p1.getLatitude(), p1.getLongitude(), p2.getLatitude(), p2.getLongitude());
}
}