Documentation ¶
Overview ¶
Package evaluator provides an interface for a fitness evaluator and some implementations for common use cases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewParallel ¶
func NewParallel(fitnessFuncs []fitness.CacheFunction, cachePowerOf2 int) *parallel
NewParallel creates a new parallel evaluator.
Types ¶
type Evaluator ¶
type Evaluator interface { // Get returns a fitness function given the index of a member. Get(i int) fitness.Function // Update carries out any updates necessary for a specified member. Update(i int) // Prepare does any preparations necessary for the evaluator. Prepare() // SetBase should be called to indicate the base of member i. SetBase(i, base int) // Swap should be called if members i and j are swapped. Swap(i, j int) }
An Evaluator is used by an algorithm to evaluate the fitness of its members.
Click to show internal directories.
Click to hide internal directories.