Class OperatorAsPerturber<TWeight, TProblem, TObjective, TSolution, TFitness>
Wraps an operator and uses it as a perturber, ignoring the level-parameter.
Inheritance
System.Object
OperatorAsPerturber<TWeight, TProblem, TObjective, TSolution, TFitness>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class OperatorAsPerturber<TWeight, TProblem, TObjective, TSolution, TFitness> : IPerturber<TWeight, TProblem, TObjective, TSolution, TFitness>, IOperator<TWeight, TProblem, TObjective, TSolution, TFitness> where TWeight : struct where TObjective : ObjectiveBase<TProblem, TSolution, TFitness>
Type Parameters
|
TWeight
|
|
TProblem
|
|
TObjective
|
|
TSolution
|
|
TFitness
|
Constructors
OperatorAsPerturber(IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>)
Creates a new operator-as-perturber.
Declaration
public OperatorAsPerturber(IOperator<TWeight, TProblem, TObjective, TSolution, TFitness> oper)
Parameters
|
IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>
oper
|
Properties
Name
Returns the name of the operator.
Declaration
public string Name { get; }
Property Value
|
System.String
|
Implements
Methods
Apply(TProblem, TObjective, TSolution, out TFitness)
Returns true if there was an improvement, false otherwise.
Declaration
public bool Apply(TProblem problem, TObjective objective, TSolution solution, out TFitness delta)
Parameters
|
TProblem
problem
The problem. |
|
TObjective
objective
The objective. |
|
TSolution
solution
The solution. |
|
TFitness
delta
The difference in fitness, when > 0 there was an improvement and a reduction in fitness. |
Returns
|
System.Boolean
|
Implements
Apply(TProblem, TObjective, TSolution, Int32, out TFitness)
Returns true if there was an improvement, false otherwise.
Declaration
public bool Apply(TProblem problem, TObjective objective, TSolution solution, int level, out TFitness delta)
Parameters
|
TProblem
problem
The problem. |
|
TObjective
objective
The objective. |
|
TSolution
solution
The solution. |
|
System.Int32
level
The level. |
|
TFitness
delta
The difference in fitness. |
Returns
|
System.Boolean
|
Implements
Supports(TObjective)
Returns true if the given object is supported.
Declaration
public bool Supports(TObjective objective)
Parameters
|
TObjective
objective
|
Returns
|
System.Boolean
|