java.lang.Object
org.elasticsearch.tdigest.Centroid
- All Implemented Interfaces:
Comparable<Centroid>
A single centroid which represents a number of data points.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Centroid
public Centroid(double x) -
Centroid
public Centroid(double x, long w) -
Centroid
public Centroid(double x, long w, int id)
-
-
Method Details
-
add
public void add(double x, long w) -
mean
public double mean() -
count
public long count() -
id
public int id() -
toString
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Centroid>
-