public final class MemoryPool extends Object implements SolverComponent
Constructor and Description |
---|
MemoryPool() |
Modifier and Type | Method and Description |
---|---|
int[] |
getNew(int size)
returns an array, from the pool if one is available, allocating it
otherwise
|
void |
initialize(Core core)
initializes the component with the given solver.
|
void |
storeOld(int[] array)
save this array for a future usage, when not needed anymore
|
String |
toString() |
public int[] getNew(int size)
size
- the size of the array we needpublic void storeOld(int[] array)
array
- the array to storepublic void initialize(Core core)
SolverComponent
initialize
in interface SolverComponent
core
- core component to initializeCopyright © 2022. All rights reserved.