Package io.rtr.alchemy.models
Class Allocations
java.lang.Object
io.rtr.alchemy.models.Allocations
Represents allocations of treatments for an experiment
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAllocates bins to a treatmentvoidclear()voiddeallocate(Treatment treatment, int size) De-allocates bins from a treatmentintgetSize()getTreatment(int bin) Get treatment assigned to a specific binintvoidreallocate(Treatment source, Treatment destination, int size) Reallocates bins from one treatment to another
-
Field Details
-
NUM_BINS
public static final int NUM_BINS- See Also:
-
-
Constructor Details
-
Allocations
public Allocations() -
Allocations
-
-
Method Details
-
getTreatment
Get treatment assigned to a specific bin- Parameters:
bin- The bin
-
allocate
Allocates bins to a treatment- Parameters:
treatment- The treatmentsize- The number of bins
-
deallocate
De-allocates bins from a treatment- Parameters:
treatment- The treatmentsize- The number of bins
-
reallocate
Reallocates bins from one treatment to another- Parameters:
source- The source treatmentdestination- The destination treatmentsize- The number of bins
-
getAllocations
-
getSize
public int getSize() -
getUnallocatedSize
public int getUnallocatedSize() -
clear
public void clear()
-