com.groupbyinc.flux.common.tdunning.math.stats.TreeDigest.class Maven / Gradle / Ivy
???? 2O 9com/groupbyinc/flux/common/tdunning/math/stats/TreeDigest >com/groupbyinc/flux/common/tdunning/math/stats/AbstractTDigest TreeDigest.java compression D summary :Lcom/groupbyinc/flux/common/tdunning/math/stats/GroupTree; count J VERBOSE_ENCODING I SMALL_ENCODING (D)V ()V
@Y 8com/groupbyinc/flux/common/tdunning/math/stats/GroupTree
this ;Lcom/groupbyinc/flux/common/tdunning/math/stats/TreeDigest; add (DI)V createCentroid =(DI)Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; % &
' >(DILcom/groupbyinc/flux/common/tdunning/math/stats/Centroid;)V # )
* x w
checkValue .
/ floor t(Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid;)Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; 1 2
3 ceiling 5 2
6 7com/groupbyinc/flux/common/tdunning/math/stats/Centroid 8 data ()Ljava/util/List; : ;
9 < createWeighted Q(DILjava/lang/Iterable;)Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; > ?
9 @ <(Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid;)V # B
C tailSet O(Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid;)Ljava/lang/Iterable; E F
G??????? java/lang/Iterable K iterator ()Ljava/util/Iterator; M N L O java/util/Iterator Q hasNext ()Z S T R U next ()Ljava/lang/Object; W X R Y mean ()D [ \
9 ] java/lang/Math _ abs (D)D a b
` c headSum <(Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid;)J e f
g ()I
i
9 j@ gen Ljava/util/Random; p q r java/util/Random t
nextDouble v \
u w remove y B
z (DILjava/lang/Iterable;)V # |
9 } size i
?@4 compress ?
? z neighbor 9Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; i$ Ljava/util/Iterator; q k neighbors OLjava/lang/Iterable; Ljava/lang/Iterable; minDistance lastNeighbor i closest sum n base start merge a(DLjava/lang/Iterable;Ljava/util/Random;)Lcom/groupbyinc/flux/common/tdunning/math/stats/TDigest;
? ?(Ljava/lang/Iterable;Ljava/util/Random;Lcom/groupbyinc/flux/common/tdunning/math/stats/TDigest;)Lcom/groupbyinc/flux/common/tdunning/math/stats/TDigest; ? ?
? subData NLjava/lang/Iterable; r =(Lcom/groupbyinc/flux/common/tdunning/math/stats/GroupTree;)V ? ?
?
recordAllData Z ? ? ? :()Lcom/groupbyinc/flux/common/tdunning/math/stats/TDigest; ? ?
? java/util/ArrayList ?
?
O java/util/List ? (Ljava/lang/Object;)Z # ? ? ? java/util/Collections ? shuffle %(Ljava/util/List;Ljava/util/Random;)V ? ?
? ? ? O centroid other reduced tmp KLjava/util/List; Ljava/util/List; ()J cdf? first ;()Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid; ? ?
? interpolate (DDD)D ? ?
? it OLjava/util/Iterator; a b left right values quantile "java/lang/IllegalArgumentException ? java/lang/StringBuilder ?
? q should be in [0,1], got ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? (D)Ljava/lang/StringBuilder; ? ?
? ? toString ()Ljava/lang/String; ? ?
? ? (Ljava/lang/String;)V ?
? ? centroids ()Ljava/lang/Iterable; ? ?
? java/lang/Double ? isNaN (D)Z ? ?
? ? (DDDDD)D ? ?
? next2
nextIndex2 nextMean2 nextIndex index previousMean
previousIndex total PLjava/util/Iterator<+Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid;>;
centroidCount byteSize
smallByteSize i
java/nio/ByteBuffer allocate (I)Ljava/nio/ByteBuffer;
asSmallBytes (Ljava/nio/ByteBuffer;)V
position i
bound buf Ljava/nio/ByteBuffer; asBytes putInt
\
putDouble (D)Ljava/nio/ByteBuffer;
putFloat (F)Ljava/nio/ByteBuffer;!"
# encode (Ljava/nio/ByteBuffer;I)V%&
' delta fromBytes R(Ljava/nio/ByteBuffer;)Lcom/groupbyinc/flux/common/tdunning/math/stats/TreeDigest; getInt, i
- getDouble/ \
0 [D2 # $
4 getFloat ()F67
8 decode (Ljava/nio/ByteBuffer;)I:;
< java/lang/IllegalStateException> 'Invalid format for serialized histogram@
? ? means encoding
ConstantValue Code LocalVariableTable LineNumberTable LocalVariableTypeTable
StackMapTable Signature ?(DLjava/lang/Iterable;Ljava/util/Random;)Lcom/groupbyinc/flux/common/tdunning/math/stats/TDigest; R()Ljava/lang/Iterable<+Lcom/groupbyinc/flux/common/tdunning/math/stats/Centroid;>;
SourceFile !
E
E F i !*? * ? *? Y? ? * ? *'? ? G ! ! " ! H <