Class Allocations

java.lang.Object
io.rtr.alchemy.models.Allocations

public class Allocations extends Object
Represents allocations of treatments for an experiment
  • Field Details

  • Constructor Details

    • Allocations

      public Allocations()
    • Allocations

      public Allocations(Iterable<Allocation> allocations)
  • Method Details

    • getTreatment

      public Treatment getTreatment(int bin)
      Get treatment assigned to a specific bin
      Parameters:
      bin - The bin
    • allocate

      public void allocate(Treatment treatment, int size)
      Allocates bins to a treatment
      Parameters:
      treatment - The treatment
      size - The number of bins
    • deallocate

      public void deallocate(Treatment treatment, int size)
      De-allocates bins from a treatment
      Parameters:
      treatment - The treatment
      size - The number of bins
    • reallocate

      public void reallocate(Treatment source, Treatment destination, int size)
      Reallocates bins from one treatment to another
      Parameters:
      source - The source treatment
      destination - The destination treatment
      size - The number of bins
    • getAllocations

      public List<Allocation> getAllocations()
    • getSize

      public int getSize()
    • getUnallocatedSize

      public int getUnallocatedSize()
    • clear

      public void clear()