Documentation of 'mikera.randomz.ProbabilityPicker' Java class
ProbabilityPicker
mikera.randomz

Class ProbabilityPicker<O>



  • public final class ProbabilityPicker<O>
    extends java.lang.Object
    • Constructor Detail

      • ProbabilityPicker

        public ProbabilityPicker()
    • Method Detail

      • pick

        public O pick()
        Picks a random object
        Returns:
        Random object chosen with associated relative probability
      • add

        public void add(O object,
                        double probability)
      • getIndex

        public int getIndex(O o)
      • get

        public double get(O o)
      • getTotal

        public double getTotal()
      • getCount

        public int getCount()
      • remove

        public void remove(java.lang.Object object)
      • parentIndex

        public static int parentIndex(int i)
      • childIndex

        public static int childIndex(int i,
                                     int branch)
      • order

        public static int order(int i)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.