Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElapsedTime ¶
ElapsedTime is satisfied when a time duration has elapsed.
func (ElapsedTime) IsSatisfied ¶
func (dur ElapsedTime) IsSatisfied(stats *evolve.PopulationStats) bool
IsSatisfied returns true if the time duration has elapsed.
func (ElapsedTime) String ¶
func (dur ElapsedTime) String() string
String returns a string representation of this condition.
type GenerationCount ¶
type GenerationCount int
GenerationCount is a condtion that is met when a number of generation has passed.
func (GenerationCount) IsSatisfied ¶
func (n GenerationCount) IsSatisfied(stats *evolve.PopulationStats) bool
IsSatisfied reports whether or not evolution should finish at the current point.
func (GenerationCount) String ¶
func (n GenerationCount) String() string
String returns a string representation of this condition.
type TargetFitness ¶
TargetFitness is a condition that is met when at least one candidate in the population has reached or exceeded a given fitness score.
func (TargetFitness) IsSatisfied ¶
func (tf TargetFitness) IsSatisfied(stats *evolve.PopulationStats) bool
IsSatisfied returns true if the specified fitness score has been reached or exceeded.
func (TargetFitness) String ¶
func (tf TargetFitness) String() string
String returns a string representation of this condition.
type UserAbort ¶
type UserAbort struct {
// contains filtered or unexported fields
}
UserAbort is a condition satisfied when Abort has been called. It allows for user-initiated termination of an evolution algorithm.
func (*UserAbort) Abort ¶
func (ua *UserAbort) Abort()
Abort triggers the condition. It is safe for concurrent use by multiple goroutines.
func (*UserAbort) IsSatisfied ¶
func (ua *UserAbort) IsSatisfied(*evolve.PopulationStats) bool
IsSatisfied reports whether or not Abort has been called. It is safe for concurrent use by multiple goroutines.