C# Class SwarmOps.FitnessTrace

Mostra file Open project: DanWBR/dwsim3 Class Usage Examples

Public Methods

Method Description
Add ( int iteration, double fitness, bool feasible ) : void

Add a fitness value to the trace at the given iteration number.

FitnessTrace ( FitnessTrace chainedFitnessTrace, int numIterations, int numIntervals, double offset ) : System.Diagnostics

Construct a new object.

Write ( TextWriter writer ) : void

Write fitness-trace to a TextWriter stream.

WriteToFile ( string filename ) : void

Write fitness-trace to a file.

Protected Methods

Method Description
Iteration ( int index ) : int

Map fitness-trace index to optimization iteration.

Log ( int index, double fitness, bool feasible ) : void

Log a fitness.

Method Details

Add() public method

Add a fitness value to the trace at the given iteration number.
public Add ( int iteration, double fitness, bool feasible ) : void
iteration int Iteration number of fitness.
fitness double Fitness value to be traced.
feasible bool Feasibility (constraint satisfaction) to be traced.
return void

FitnessTrace() public method

Construct a new object.
public FitnessTrace ( FitnessTrace chainedFitnessTrace, int numIterations, int numIntervals, double offset ) : System.Diagnostics
chainedFitnessTrace FitnessTrace
numIterations int
numIntervals int
offset double
return System.Diagnostics

Iteration() protected method

Map fitness-trace index to optimization iteration.
protected Iteration ( int index ) : int
index int
return int

Log() protected abstract method

Log a fitness.
protected abstract Log ( int index, double fitness, bool feasible ) : void
index int Index into fitness-trace, mapped from optimization iteration.
fitness double Fitness value to log.
feasible bool Feasibility (constraint satisfaction) to log.
return void

Write() public abstract method

Write fitness-trace to a TextWriter stream.
public abstract Write ( TextWriter writer ) : void
writer System.IO.TextWriter
return void

WriteToFile() public method

Write fitness-trace to a file.
public WriteToFile ( string filename ) : void
filename string Name of file.
return void