These pages are auto-generated from self-documenting comments embedded in class files.
For more information on breve and steve, refer to the breve homepage.

## Object : PushDiversityPool

This class is included as part of the file Push.tz.
To use this class in a simulation, include the line "@use Push."

### Class description:

> Summary: a tool to test diversity in populations of PushProgram objects.

> The PushDiversityPool allows you to determine the level of genotypic diversity of PushProgram objects, typically individuals in a genetic programming or artificial life experiment.

> Diversity is detemined as the number of unique species which differ from one another by at least a certain tolerance value. "Difference" is defined by the algorithm outlined in get-discrepancy (PushProgram). No single species will contain any two individuals which differ by more than the specified tolerance.

> The tolerance can be set with the method set-tolerance. Programs can then be added using add. The number of species can then be retreived using get-size. The method clear allows the diversity pool to be emptied and reused.

### Class methods:

> - add
> - clear
> - get-size
> - set-tolerance

`add program p (object)`

> Adds a program to the diversity pool.

`clear`

> Clears the diversity pool so that it may be reused.

`get-size`

> Returns the number of unique diversity "species" in the pool.

`set-tolerance to t (int)`

> Sets the tolerance of the diversity pool to t. When the tolerance is set, it does not effect species counts for programs already added. When you change the tolerance, you must remove all program objects (using clear) and add them again.

> The default tolerance level is 10.

Documentation created Thu Jul 3 18:18:12 2008