Uses of Class
squidpony.squidmath.ProbabilityTable
Package | Description |
---|---|
squidpony.squidmath |
A very broad package containing random number generators, geometry tools, data structures, and noise functions.
|
-
Uses of ProbabilityTable in squidpony.squidmath
Fields in squidpony.squidmath with type parameters of type ProbabilityTable Modifier and Type Field Description ArrayList<ProbabilityTable<T>>
ProbabilityTable. extraTable
The list of items that can be produced indirectly fromrandom()
(looking up values from inside the nested tables).Methods in squidpony.squidmath that return ProbabilityTable Modifier and Type Method Description ProbabilityTable<T>
ProbabilityTable. add(ProbabilityTable<T> table, int weight)
Adds the given probability table as a possible set of results for this table.ProbabilityTable<T>
ProbabilityTable. add(T item, int weight)
Adds the given item to the table.ProbabilityTable<T>
ProbabilityTable. addAll(OrderedMap<T,Integer> itemsAndWeights)
Given an OrderedMap of T element keys and Integer weight values, adds all T keys with their corresponding weights into this ProbabilityTable.ProbabilityTable<T>
ProbabilityTable. addAllNested(OrderedMap<ProbabilityTable<T>,Integer> itemsAndWeights)
Given an OrderedMap of ProbabilityTable keys and Integer weight values, adds all keys as nested tables with their corresponding weights into this ProbabilityTable.ProbabilityTable<T>
ProbabilityTable. copy()
Copies this ProbabilityTable so nothing in the copy is shared with the original, except for the T items (which might not be possible to copy).Methods in squidpony.squidmath that return types with arguments of type ProbabilityTable Modifier and Type Method Description ArrayList<ProbabilityTable<T>>
ProbabilityTable. tables()
Provides a set of the nested ProbabilityTable values in this table, without reference to their weight.Methods in squidpony.squidmath with parameters of type ProbabilityTable Modifier and Type Method Description ProbabilityTable<T>
ProbabilityTable. add(ProbabilityTable<T> table, int weight)
Adds the given probability table as a possible set of results for this table.boolean
ProbabilityTable. contentEquals(ProbabilityTable<T> o)
Can avoid some checks thatequals(Object)
needs because this always takes a ProbabilityTable.int
ProbabilityTable. weight(ProbabilityTable<T> item)
Returns the weight of the extra table if present.Method parameters in squidpony.squidmath with type arguments of type ProbabilityTable Modifier and Type Method Description ProbabilityTable<T>
ProbabilityTable. addAllNested(OrderedMap<ProbabilityTable<T>,Integer> itemsAndWeights)
Given an OrderedMap of ProbabilityTable keys and Integer weight values, adds all keys as nested tables with their corresponding weights into this ProbabilityTable.