com.groupbyinc.flux.common.tdunning.math.stats.Centroid.class Maven / Gradle / Ivy
???? 2 ? 7com/groupbyinc/flux/common/tdunning/math/stats/Centroid cLjava/lang/Object;Ljava/lang/Comparable; java/lang/Object java/lang/Comparable
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 incrementAndGet ()I " #
! $ & java/util/ArrayList (
) this 9Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; record Z (D)V
0 getAndIncrement 2 #
! 3 start (DII)V 5 6
7 x (DI)V w (DIZ)V add = :
> java/lang/Double @ valueOf (D)Ljava/lang/Double; B C
A D java/util/List F (Ljava/lang/Object;)Z = H G I mean ()D toString ()Ljava/lang/String; java/lang/StringBuilder O
P Centroid{centroid= R append -(Ljava/lang/String;)Ljava/lang/StringBuilder; T U
P V (D)Ljava/lang/StringBuilder; T X
P Y , count= [ (I)Ljava/lang/StringBuilder; T ]
P ^ (C)Ljava/lang/StringBuilder; T `
P a M N
P c hashCode compareTo <(Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid;)I compare (DD)I h i
A j o r data ()Ljava/util/List;
insertData createWeighted Q(DILjava/lang/Iterable;)Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; java/lang/Iterable s (DILjava/lang/Iterable;)V = u
v )Ljava/lang/Iterable<+Ljava/lang/Double;>; Ljava/lang/Iterable; iterator ()Ljava/util/Iterator; z { t | java/util/Iterator ~ hasNext ()Z ? ? ? next ()Ljava/lang/Object; ? ? ? old Ljava/lang/Double; i$ Ljava/util/Iterator; (Ljava/lang/Object;)I f g
? x0 Ljava/lang/Object; (I)V ?
! ? Signature Code LocalVariableTable LineNumberTable
StackMapTable &()Ljava/util/List; LocalVariableTypeTable f(DILjava/lang/Iterable<+Ljava/lang/Double;>;)Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; .(DILjava/lang/Iterable<+Ljava/lang/Double;>;)V
SourceFile !
? ? ? -*? *? *? *? *? ? %? '? *? )Y? *? ? ? - + , - - . ? " $ " % &