com.groupbyinc.flux.common.tdunning.math.stats.Centroid.class Maven / Gradle / Ivy
???? 3 ? 7com/groupbyinc/flux/common/tdunning/math/stats/Centroid yLjava/lang/Object;Ljava/lang/Comparable;Ljava/io/Serializable; java/lang/Object java/lang/Comparable java/io/Serializable
Centroid.java uniqueCount +Ljava/util/concurrent/atomic/AtomicInteger; centroid D count I id
actualData Ljava/util/List; $Ljava/util/List; (Z)V ()V
)java/util/concurrent/atomic/AtomicInteger " getAndIncrement ()I $ %
# & ( java/util/ArrayList *
+ this 9Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; record Z (D)V
2 start (DII)V 4 5
6 x (DI)V w (DIZ)V (DILjava/util/List;)V 9
= data add @ 9
A java/lang/Double C valueOf (D)Ljava/lang/Double; E F
D G java/util/List I (Ljava/lang/Object;)Z @ K J L mean ()D toString ()Ljava/lang/String; java/lang/StringBuilder R
S Centroid{centroid= U append -(Ljava/lang/String;)Ljava/lang/StringBuilder; W X
S Y (D)Ljava/lang/StringBuilder; W [
S \ , count= ^ (I)Ljava/lang/StringBuilder; W `
S a (C)Ljava/lang/StringBuilder; W c
S d P Q
S f hashCode compareTo <(Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid;)I compare (DD)I k l
D m o r ()Ljava/util/List;
insertData createWeighted Q(DILjava/lang/Iterable;)Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; java/lang/Iterable u (DILjava/lang/Iterable;)V @ w
x )Ljava/lang/Iterable<+Ljava/lang/Double;>; Ljava/lang/Iterable; iterator ()Ljava/util/Iterator; | } v ~ java/util/Iterator ? hasNext ()Z ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? >com/groupbyinc/flux/common/tdunning/math/stats/AbstractTDigest ? weightedAverage (DDDD)D ? ?
? ? old Ljava/lang/Double;
readObject (Ljava/io/ObjectInputStream;)V java/lang/ClassNotFoundException ? java/io/IOException ? java/io/ObjectInputStream ? defaultReadObject ?
? ? in Ljava/io/ObjectInputStream; (Ljava/lang/Object;)I i j
? (I)V ?
# ? Signature Code LocalVariableTable LineNumberTable
StackMapTable LocalVariableTypeTable )(DILjava/util/List;)V &()Ljava/util/List; f(DILjava/lang/Iterable<+Ljava/lang/Double;>;)Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; .(DILjava/lang/Iterable<+Ljava/lang/Double;>;)V
Exceptions
SourceFile !
? ? ? ? -*? *? *? *? *? !? '? )? *? +Y? ,? ? ? - - . - / 0 ? " * ! " ( + , ! - , / ?
? , 1 ? N *? 3*'? !? '? 7? ? - . 8 ? 2 3 4 9 ? X *? 3*'? !? '? 7? ? - . 8 : ? 7 8 9 5 ? ^ *? 3*'? 7? ? * - . 8 : ? <