Method | Description | |
---|---|---|
ArrayToString ( double x ) : string |
Convert an array of System.double values to a string.
|
|
ArrayToString ( double x, int digits ) : string |
Convert an array of System.double values to a string.
|
|
ArrayToStringRaw ( double x ) : string |
Convert an array of System.double values to a string. Not formatted like a C# array.
|
|
ArrayToStringRaw ( double x, int digits ) : string |
Convert an array of System.double values to a string. Not formattet like a C# array.
|
|
BetterFeasible ( bool oldFeasible, bool newFeasible ) : bool |
Return whether feasibility (constraint satisfaction) of new candidate solution is same as or better than feasibility of old candidate solution.
|
|
BetterFeasibleFitness ( bool oldFeasible, bool newFeasible, double oldFitness, double newFitness ) : bool |
Return whether the new candidate solution is better than the old, depending on their feasibility (constraint satisfaction) and fitness.
|
|
BetweenBounds ( double x, double lower, double upper ) : bool |
Return whether array of values is between lower and upper boundaries.
|
|
Bound ( double x, double lower, double upper ) : double |
Bound a value between lower and upper boundaries.
|
|
Bound ( double &x, double lower, double upper ) : void |
Bound array of values between lower and upper boundaries.
|
|
Denormalize ( double x ) : double |
Return denormalized version of x. This is useful for avoiding expensive CPU usage when x underflows.
|
|
Denormalize ( double &x ) : void |
Denormalize an array.
|
|
DenormalizeTruncate ( double x ) : double |
If Abs(x) is below a limit then it is set to zero.
|
|
FormatNumber ( double d ) : string |
Convert numeric value d to a string with convenient formatting.
|
|
FormatPercent ( double d ) : string |
Convert numeric value d to a percentage string, e.g. d==0.253212 returns string "25.32%"
|
|
Initialize ( double &x, double value ) : void |
Initialize array with value.
|
|
InitializeRange ( double &x, double lower, double upper ) : void |
Initialize array with the range between the boundaries. That is, x[i] = upper[i]-lower[i].
|
|
InitializeUniform ( double &x, double lower, double upper ) : void |
Initialize array with uniform random values between given boundaries.
|
|
NewMatrix ( int dim1, int dim2 ) : double[][] |
Allocate and return a new matrix double[dim1][dim2].
|
|
Norm ( double x ) : double |
Euclidian norm (or length) of a numeric vector.
|
|
NumberToString ( double x, int digits ) : string |
Convert a double-value to a string, formatted for array output.
|
|
PrintNewline ( ) : void |
Print a newline to Console.
|
|
PrintParameters ( |
Print parameters using names associated with an optimization problem.
|
|
PrintSolution ( double parameters, double fitness, double fitnessLimit, bool oldFeasible, bool newFeasible, bool formatAsArray ) : void |
Print parameters, fitness and feasibility to Console, and print a marking if fitness was an improvement to fitnessLimit.
|
|
Sample ( double x, double range ) : double |
Pick a uniform random sample from [x-range, x+range].
|
|
SampleBounded ( double x, double range, double lowerBound, double upperBound ) : double |
First bound the sampling range [x-range, x+range] using lowerBound and upperBound respectively, and then pick a uniform random sample from the bounded range. This avoids samples being boundary points.
|
public static ArrayToString ( double x ) : string | ||
x | double | Array of values to be converted to string. |
return | string |
public static ArrayToString ( double x, int digits ) : string | ||
x | double | Array of values to be converted to string. |
digits | int | Number of digits for each value. |
return | string |
public static ArrayToStringRaw ( double x ) : string | ||
x | double | Array of values to be converted to string. |
return | string |
public static ArrayToStringRaw ( double x, int digits ) : string | ||
x | double | Array of values to be converted to string. |
digits | int | Number of digits for each value. |
return | string |
public static BetterFeasible ( bool oldFeasible, bool newFeasible ) : bool | ||
oldFeasible | bool | Feasibility of old candidate solution. |
newFeasible | bool | Feasibility of new candidate solution. |
return | bool |
public static BetterFeasibleFitness ( bool oldFeasible, bool newFeasible, double oldFitness, double newFitness ) : bool | ||
oldFeasible | bool | Feasibility of old candidate solution. |
newFeasible | bool | Feasibility of new candidate solution. |
oldFitness | double | Fitness of old candidate solution. |
newFitness | double | Fitness of new candidate solution. |
return | bool |
public static BetweenBounds ( double x, double lower, double upper ) : bool | ||
x | double | Array of values to be bounded. |
lower | double | Lower boundaries. |
upper | double | Upper boundaries. |
return | bool |
public static Bound ( double x, double lower, double upper ) : double | ||
x | double | Parameter to be bounded. |
lower | double | Lower boundary. |
upper | double | Upper boundary. |
return | double |
public static Bound ( double &x, double lower, double upper ) : void | ||
x | double | Array of values to be bounded. |
lower | double | Lower boundaries. |
upper | double | Upper boundaries. |
return | void |
public static Denormalize ( double x ) : double | ||
x | double | |
return | double |
public static Denormalize ( double &x ) : void | ||
x | double | |
return | void |
public static DenormalizeTruncate ( double x ) : double | ||
x | double | |
return | double |
public static FormatNumber ( double d ) : string | ||
d | double | |
return | string |
public static FormatPercent ( double d ) : string | ||
d | double | |
return | string |
public static Initialize ( double &x, double value ) : void | ||
x | double | Array to be initialized. |
value | double | Value. |
return | void |
public static InitializeRange ( double &x, double lower, double upper ) : void | ||
x | double | Array to be initialized. |
lower | double | Lower boundary. |
upper | double | Upper boundary. |
return | void |
public static InitializeUniform ( double &x, double lower, double upper ) : void | ||
x | double | Array to be initialized. |
lower | double | Lower boundary. |
upper | double | Upper boundary. |
return | void |
public static NewMatrix ( int dim1, int dim2 ) : double[][] | ||
dim1 | int | |
dim2 | int | |
return | double[][] |
public static NumberToString ( double x, int digits ) : string | ||
x | double | Value to convert. |
digits | int | Number of digits. |
return | string |
public static PrintParameters ( |
||
problem | Optimization problem with associated parameter-names. | |
parameters | double | Parameters to be printed. |
return | void |
public static PrintSolution ( double parameters, double fitness, double fitnessLimit, bool oldFeasible, bool newFeasible, bool formatAsArray ) : void | ||
parameters | double | |
fitness | double | |
fitnessLimit | double | |
oldFeasible | bool | |
newFeasible | bool | |
formatAsArray | bool | |
return | void |
public static Sample ( double x, double range ) : double | ||
x | double | |
range | double | |
return | double |
public static SampleBounded ( double x, double range, double lowerBound, double upperBound ) : double | ||
x | double | |
range | double | |
lowerBound | double | |
upperBound | double | |
return | double |