MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
|
An interface for implementation of a chromosome pool. More...
Public Member Functions | |
IChromosome | acquire () |
Returns a chromosome from the pool. | |
void | release (IChromosome chromosome) |
Puts the specified chromosome into the pool so it may be reused. | |
void | setMaximumSize (int size) |
Sets the capacity of the pool. | |
void | clear () |
Empties the chromosome pool. |
An interface for implementation of a chromosome pool.
The pool may be used to store reusable chromosome instances, so instead of creating new chromosome instances, the chromosomes from the pool may be used which give a performance boost proportional to the complexity of chromosome's construction.
IChromosome MCScheduling.GeneticAlgorithm.IChromosomePool.acquire | ( | ) |
Returns a chromosome from the pool.
If the pool is empty, null is returned.
Implemented in MCScheduling.GeneticAlgorithm.CChromosomePool.
void MCScheduling.GeneticAlgorithm.IChromosomePool.release | ( | IChromosome | chromosome | ) |
Puts the specified chromosome into the pool so it may be reused.
chromosome | The chromosome to be added into the pool. |
Implemented in MCScheduling.GeneticAlgorithm.CChromosomePool.
void MCScheduling.GeneticAlgorithm.IChromosomePool.setMaximumSize | ( | int | size | ) |
Sets the capacity of the pool.
Any chromosome added when the pool is at its maximum capacity is discarded.
size | The size of the pool. |
Implemented in MCScheduling.GeneticAlgorithm.CChromosomePool.