public class org.apache.commons.math3.distribution.EnumeratedDistribution<T> implements java.io.Serializable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.commons.math3.distribution.EnumeratedDistribution
super_class: java.lang.Object
{
private static final long serialVersionUID;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 20123308
protected final org.apache.commons.math3.random.RandomGenerator random;
descriptor: Lorg/apache/commons/math3/random/RandomGenerator;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
private final java.util.List<T> singletons;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<TT;>;
private final double[] probabilities;
descriptor: [D
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final double[] cumulativeProbabilities;
descriptor: [D
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(java.util.List<org.apache.commons.math3.util.Pair<T, java.lang.Double>>);
descriptor: (Ljava/util/List;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
new org.apache.commons.math3.random.Well19937c
dup
invokespecial org.apache.commons.math3.random.Well19937c.<init>:()V
aload 1
invokespecial org.apache.commons.math3.distribution.EnumeratedDistribution.<init>:(Lorg/apache/commons/math3/random/RandomGenerator;Ljava/util/List;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/commons/math3/distribution/EnumeratedDistribution<TT;>;
0 2 1 pmf Ljava/util/List<Lorg/apache/commons/math3/util/Pair<TT;Ljava/lang/Double;>;>;
Exceptions:
throws org.apache.commons.math3.exception.NotPositiveException, org.apache.commons.math3.exception.MathArithmeticException, org.apache.commons.math3.exception.NotFiniteNumberException, org.apache.commons.math3.exception.NotANumberException
Signature: (Ljava/util/List<Lorg/apache/commons/math3/util/Pair<TT;Ljava/lang/Double;>;>;)V
MethodParameters:
Name Flags
pmf final
public void <init>(org.apache.commons.math3.random.RandomGenerator, java.util.List<org.apache.commons.math3.util.Pair<T, java.lang.Double>>);
descriptor: (Lorg/apache/commons/math3/random/RandomGenerator;Ljava/util/List;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.apache.commons.math3.distribution.EnumeratedDistribution.random:Lorg/apache/commons/math3/random/RandomGenerator;
2: aload 0
new java.util.ArrayList
dup
aload 2
invokeinterface java.util.List.size:()I
invokespecial java.util.ArrayList.<init>:(I)V
putfield org.apache.commons.math3.distribution.EnumeratedDistribution.singletons:Ljava/util/List;
3: aload 2
invokeinterface java.util.List.size:()I
newarray 7
astore 3
start local 3 4: iconst_0
istore 4
start local 4 5: goto 17
6: StackMap locals: org.apache.commons.math3.distribution.EnumeratedDistribution org.apache.commons.math3.random.RandomGenerator java.util.List double[] int
StackMap stack:
aload 2
iload 4
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast org.apache.commons.math3.util.Pair
astore 5
start local 5 7: aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.singletons:Ljava/util/List;
aload 5
invokevirtual org.apache.commons.math3.util.Pair.getKey:()Ljava/lang/Object;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
8: aload 5
invokevirtual org.apache.commons.math3.util.Pair.getValue:()Ljava/lang/Object;
checkcast java.lang.Double
invokevirtual java.lang.Double.doubleValue:()D
dstore 6
start local 6 9: dload 6
dconst_0
dcmpg
ifge 11
10: new org.apache.commons.math3.exception.NotPositiveException
dup
aload 5
invokevirtual org.apache.commons.math3.util.Pair.getValue:()Ljava/lang/Object;
checkcast java.lang.Number
invokespecial org.apache.commons.math3.exception.NotPositiveException.<init>:(Ljava/lang/Number;)V
athrow
11: StackMap locals: org.apache.commons.math3.util.Pair double
StackMap stack:
dload 6
invokestatic java.lang.Double.isInfinite:(D)Z
ifeq 13
12: new org.apache.commons.math3.exception.NotFiniteNumberException
dup
dload 6
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
iconst_0
anewarray java.lang.Object
invokespecial org.apache.commons.math3.exception.NotFiniteNumberException.<init>:(Ljava/lang/Number;[Ljava/lang/Object;)V
athrow
13: StackMap locals:
StackMap stack:
dload 6
invokestatic java.lang.Double.isNaN:(D)Z
ifeq 15
14: new org.apache.commons.math3.exception.NotANumberException
dup
invokespecial org.apache.commons.math3.exception.NotANumberException.<init>:()V
athrow
15: StackMap locals:
StackMap stack:
aload 3
iload 4
dload 6
dastore
end local 6 end local 5 16: iinc 4 1
StackMap locals:
StackMap stack:
17: iload 4
aload 2
invokeinterface java.util.List.size:()I
if_icmplt 6
end local 4 18: aload 0
aload 3
dconst_1
invokestatic org.apache.commons.math3.util.MathArrays.normalizeArray:([DD)[D
putfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
19: aload 0
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
arraylength
newarray 7
putfield org.apache.commons.math3.distribution.EnumeratedDistribution.cumulativeProbabilities:[D
20: dconst_0
dstore 4
start local 4 21: iconst_0
istore 6
start local 6 22: goto 26
23: StackMap locals: org.apache.commons.math3.distribution.EnumeratedDistribution org.apache.commons.math3.random.RandomGenerator java.util.List double[] double int
StackMap stack:
dload 4
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
iload 6
daload
dadd
dstore 4
24: aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.cumulativeProbabilities:[D
iload 6
dload 4
dastore
25: iinc 6 1
StackMap locals:
StackMap stack:
26: iload 6
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
arraylength
if_icmplt 23
end local 6 27: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Lorg/apache/commons/math3/distribution/EnumeratedDistribution<TT;>;
0 28 1 rng Lorg/apache/commons/math3/random/RandomGenerator;
0 28 2 pmf Ljava/util/List<Lorg/apache/commons/math3/util/Pair<TT;Ljava/lang/Double;>;>;
4 28 3 probs [D
5 18 4 i I
7 16 5 sample Lorg/apache/commons/math3/util/Pair<TT;Ljava/lang/Double;>;
9 16 6 p D
21 28 4 sum D
22 27 6 i I
Exceptions:
throws org.apache.commons.math3.exception.NotPositiveException, org.apache.commons.math3.exception.MathArithmeticException, org.apache.commons.math3.exception.NotFiniteNumberException, org.apache.commons.math3.exception.NotANumberException
Signature: (Lorg/apache/commons/math3/random/RandomGenerator;Ljava/util/List<Lorg/apache/commons/math3/util/Pair<TT;Ljava/lang/Double;>;>;)V
MethodParameters:
Name Flags
rng final
pmf final
public void reseedRandomGenerator(long);
descriptor: (J)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.random:Lorg/apache/commons/math3/random/RandomGenerator;
lload 1
invokeinterface org.apache.commons.math3.random.RandomGenerator.setSeed:(J)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/commons/math3/distribution/EnumeratedDistribution<TT;>;
0 2 1 seed J
MethodParameters:
Name Flags
seed
double probability();
descriptor: (Ljava/lang/Object;)D
flags: (0x0000)
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: dconst_0
dstore 2
start local 2 1: iconst_0
istore 4
start local 4 2: goto 7
3: StackMap locals: double int
StackMap stack:
aload 1
ifnonnull 4
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.singletons:Ljava/util/List;
iload 4
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
ifnull 5
4: StackMap locals:
StackMap stack:
aload 1
ifnull 6
aload 1
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.singletons:Ljava/util/List;
iload 4
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 6
5: StackMap locals:
StackMap stack:
dload 2
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
iload 4
daload
dadd
dstore 2
6: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
7: iload 4
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
arraylength
if_icmplt 3
end local 4 8: dload 2
dreturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/apache/commons/math3/distribution/EnumeratedDistribution<TT;>;
0 9 1 x TT;
1 9 2 probability D
2 8 4 i I
Signature: (TT;)D
MethodParameters:
Name Flags
x final
public java.util.List<org.apache.commons.math3.util.Pair<T, java.lang.Double>> getPmf();
descriptor: ()Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=1
start local 0 0: new java.util.ArrayList
dup
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
arraylength
invokespecial java.util.ArrayList.<init>:(I)V
astore 1
start local 1 1: iconst_0
istore 2
start local 2 2: goto 5
3: StackMap locals: java.util.List int
StackMap stack:
aload 1
new org.apache.commons.math3.util.Pair
dup
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.singletons:Ljava/util/List;
iload 2
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
iload 2
daload
invokestatic java.lang.Double.valueOf:(D)Ljava/lang/Double;
invokespecial org.apache.commons.math3.util.Pair.<init>:(Ljava/lang/Object;Ljava/lang/Object;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
4: iinc 2 1
StackMap locals:
StackMap stack:
5: iload 2
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
arraylength
if_icmplt 3
end local 2 6: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/commons/math3/distribution/EnumeratedDistribution<TT;>;
1 7 1 samples Ljava/util/List<Lorg/apache/commons/math3/util/Pair<TT;Ljava/lang/Double;>;>;
2 6 2 i I
Signature: ()Ljava/util/List<Lorg/apache/commons/math3/util/Pair<TT;Ljava/lang/Double;>;>;
public T sample();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=1
start local 0 0: aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.random:Lorg/apache/commons/math3/random/RandomGenerator;
invokeinterface org.apache.commons.math3.random.RandomGenerator.nextDouble:()D
dstore 1
start local 1 1: aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.cumulativeProbabilities:[D
dload 1
invokestatic java.util.Arrays.binarySearch:([DD)I
istore 3
start local 3 2: iload 3
ifge 4
3: iload 3
ineg
iconst_1
isub
istore 3
4: StackMap locals: double int
StackMap stack:
iload 3
iflt 8
5: iload 3
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.probabilities:[D
arraylength
if_icmpge 8
6: dload 1
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.cumulativeProbabilities:[D
iload 3
daload
dcmpg
ifge 8
7: aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.singletons:Ljava/util/List;
iload 3
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
areturn
8: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.singletons:Ljava/util/List;
aload 0
getfield org.apache.commons.math3.distribution.EnumeratedDistribution.singletons:Ljava/util/List;
invokeinterface java.util.List.size:()I
iconst_1
isub
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
areturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/apache/commons/math3/distribution/EnumeratedDistribution<TT;>;
1 9 1 randomValue D
2 9 3 index I
Signature: ()TT;
public java.lang.Object[] sample(int);
descriptor: (I)[Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: iload 1
ifgt 4
1: new org.apache.commons.math3.exception.NotStrictlyPositiveException
dup
getstatic org.apache.commons.math3.exception.util.LocalizedFormats.NUMBER_OF_SAMPLES:Lorg/apache/commons/math3/exception/util/LocalizedFormats;
2: iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
3: invokespecial org.apache.commons.math3.exception.NotStrictlyPositiveException.<init>:(Lorg/apache/commons/math3/exception/util/Localizable;Ljava/lang/Number;)V
athrow
4: StackMap locals:
StackMap stack:
iload 1
anewarray java.lang.Object
astore 2
start local 2 5: iconst_0
istore 3
start local 3 6: goto 9
7: StackMap locals: java.lang.Object[] int
StackMap stack:
aload 2
iload 3
aload 0
invokevirtual org.apache.commons.math3.distribution.EnumeratedDistribution.sample:()Ljava/lang/Object;
aastore
8: iinc 3 1
StackMap locals:
StackMap stack:
9: iload 3
iload 1
if_icmplt 7
end local 3 10: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/commons/math3/distribution/EnumeratedDistribution<TT;>;
0 11 1 sampleSize I
5 11 2 out [Ljava/lang/Object;
6 10 3 i I
Exceptions:
throws org.apache.commons.math3.exception.NotStrictlyPositiveException
MethodParameters:
Name Flags
sampleSize
public T[] sample(int, );
descriptor: (I[Ljava/lang/Object;)[Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: iload 1
ifgt 2
1: new org.apache.commons.math3.exception.NotStrictlyPositiveException
dup
getstatic org.apache.commons.math3.exception.util.LocalizedFormats.NUMBER_OF_SAMPLES:Lorg/apache/commons/math3/exception/util/LocalizedFormats;
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokespecial org.apache.commons.math3.exception.NotStrictlyPositiveException.<init>:(Lorg/apache/commons/math3/exception/util/Localizable;Ljava/lang/Number;)V
athrow
2: StackMap locals:
StackMap stack:
aload 2
ifnonnull 4
3: new org.apache.commons.math3.exception.NullArgumentException
dup
getstatic org.apache.commons.math3.exception.util.LocalizedFormats.INPUT_ARRAY:Lorg/apache/commons/math3/exception/util/LocalizedFormats;
iconst_0
anewarray java.lang.Object
invokespecial org.apache.commons.math3.exception.NullArgumentException.<init>:(Lorg/apache/commons/math3/exception/util/Localizable;[Ljava/lang/Object;)V
athrow
4: StackMap locals:
StackMap stack:
aload 2
arraylength
iload 1
if_icmpge 8
5: aload 2
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getComponentType:()Ljava/lang/Class;
iload 1
invokestatic java.lang.reflect.Array.newInstance:(Ljava/lang/Class;I)Ljava/lang/Object;
checkcast java.lang.Object[]
astore 4
start local 4 6: aload 4
astore 3
end local 4 start local 3 7: goto 9
end local 3 8: StackMap locals:
StackMap stack:
aload 2
astore 3
start local 3 9: StackMap locals: java.lang.Object[]
StackMap stack:
iconst_0
istore 4
start local 4 10: goto 13
11: StackMap locals: int
StackMap stack:
aload 3
iload 4
aload 0
invokevirtual org.apache.commons.math3.distribution.EnumeratedDistribution.sample:()Ljava/lang/Object;
aastore
12: iinc 4 1
StackMap locals:
StackMap stack:
13: iload 4
iload 1
if_icmplt 11
end local 4 14: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/apache/commons/math3/distribution/EnumeratedDistribution<TT;>;
0 15 1 sampleSize I
0 15 2 array [Ljava/lang/Object;
7 8 3 out [Ljava/lang/Object;
9 15 3 out [Ljava/lang/Object;
6 7 4 unchecked [Ljava/lang/Object;
10 14 4 i I
Exceptions:
throws org.apache.commons.math3.exception.NotStrictlyPositiveException
Signature: (I[TT;)[TT;
MethodParameters:
Name Flags
sampleSize
array final
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;Ljava/io/Serializable;
SourceFile: "EnumeratedDistribution.java"