public class PoissonAllocation extends AbstractAllocation
Allocation.AllocType
Constructor and Description |
---|
PoissonAllocation(java.util.Collection<Allocatable> allocatableChoices,
double dropRate,
Allocation.AllocType type)
Creates an allocation between certain resources with a simple rule: the probability
to pick the second one is dropRate times the probability of the first one, and so on.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<Allocatable> |
getAllAllocatables() |
java.util.Set<Allocatable> |
getAllocation() |
java.util.Set<Allocatable> |
getAllocation(java.lang.String allocString) |
java.util.Map<java.lang.String,java.lang.Double> |
getProbabilitiesOfAllocations() |
getEntropy, getString, getType
public PoissonAllocation(java.util.Collection<Allocatable> allocatableChoices, double dropRate, Allocation.AllocType type)
allocatableChoices
- choices to pick from.dropRate
- a factor (between 0 and 1) that makes the next choice less likely than the previous in the listtype
- public java.util.Set<Allocatable> getAllocation()
public java.util.Map<java.lang.String,java.lang.Double> getProbabilitiesOfAllocations()
public java.util.Set<Allocatable> getAllAllocatables()
public java.util.Set<Allocatable> getAllocation(java.lang.String allocString)