public class Allocations extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
NUM_BINS |
| Constructor and Description |
|---|
Allocations() |
Allocations(Iterable<Allocation> allocations) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocate(Treatment treatment,
int size)
Allocates bins to a treatment
|
void |
clear() |
void |
deallocate(Treatment treatment,
int size)
De-allocates bins from a treatment
|
List<Allocation> |
getAllocations() |
int |
getSize() |
Treatment |
getTreatment(int bin)
Get treatment assigned to a specific bin
|
int |
getUnallocatedSize() |
void |
reallocate(Treatment source,
Treatment destination,
int size)
Reallocates bins from one treatment to another
|
public static final int NUM_BINS
public Allocations()
public Allocations(Iterable<Allocation> allocations)
public Treatment getTreatment(int bin)
bin - The binpublic void allocate(Treatment treatment, int size)
treatment - The treatmentsize - The number of binspublic void deallocate(Treatment treatment, int size)
treatment - The treatmentsize - The number of binspublic void reallocate(Treatment source, Treatment destination, int size)
source - The source treatmentdestination - The destination treatmentsize - The number of binspublic List<Allocation> getAllocations()
public int getSize()
public int getUnallocatedSize()
public void clear()
Copyright © 2020. All rights reserved.