MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
Public Member Functions
MCScheduling.GeneticAlgorithm.CChromosomePool Class Reference

The basic implementation of the IChromosomePool interface. More...

Inheritance diagram for MCScheduling.GeneticAlgorithm.CChromosomePool:
MCScheduling.GeneticAlgorithm.IChromosomePool

List of all members.

Public Member Functions

 CChromosomePool ()
 Creates a new chromosome pool with the maximum size of 64 instances.
 CChromosomePool (int size)
 Creates a new chromosome pool with the specified maximum size.
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.

Detailed Description

The basic implementation of the IChromosomePool interface.

The pool is represented by a dynamic list of chromosomes.


Member Function Documentation

IChromosome MCScheduling.GeneticAlgorithm.CChromosomePool.acquire ( )

Returns a chromosome from the pool.

If the pool is empty, null is returned.

Returns:
A chromosome, or null, if the pool is empty.

Implements MCScheduling.GeneticAlgorithm.IChromosomePool.

void MCScheduling.GeneticAlgorithm.CChromosomePool.release ( IChromosome  chromosome)

Puts the specified chromosome into the pool so it may be reused.

Parameters:
chromosomeThe chromosome to be added into the pool.

Implements MCScheduling.GeneticAlgorithm.IChromosomePool.

void MCScheduling.GeneticAlgorithm.CChromosomePool.setMaximumSize ( int  size)

Sets the capacity of the pool.

Any chromosome added when the pool is at its maximum capacity is discarded.

Parameters:
sizeThe size of the pool.

Implements MCScheduling.GeneticAlgorithm.IChromosomePool.

 All Classes Namespaces Functions Variables Properties