Class IterativeSolver<TWeight, TProblem, TObjective, TSolution, TFitness>
A solver that let's another solver try n-times, apply some operator(s), and keeps the best obtained solution.
Inheritance
System.Object
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>
IterativeSolver<TWeight, TProblem, TObjective, TSolution, TFitness>
Inherited Members
SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.Solve(TProblem, TObjective, TFitness)
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 IterativeSolver<TWeight, TProblem, TObjective, TSolution, TFitness> : SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>, ISolver<TWeight, TProblem, TObjective, TSolution, TFitness> where TWeight : struct where TObjective : ObjectiveBase<TProblem, TSolution, TFitness> where TSolution : ISolution
Type Parameters
|
TWeight
|
|
TProblem
|
|
TObjective
|
|
TSolution
|
|
TFitness
|
Constructors
IterativeSolver(ISolver<TWeight, TProblem, TObjective, TSolution, TFitness>, Int32, IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>[])
Creates a new iterative improvement solver.
Declaration
public IterativeSolver(ISolver<TWeight, TProblem, TObjective, TSolution, TFitness> solver, int n, params IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>[] operators)
Parameters
|
ISolver<TWeight, TProblem, TObjective, TSolution, TFitness>
solver
|
|
System.Int32
n
|
|
IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>[]
operators
|
IterativeSolver(ISolver<TWeight, TProblem, TObjective, TSolution, TFitness>, Int32, SolverDelegates.StopConditionDelegate<TProblem, TObjective, TSolution>, IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>[])
Creates a new iterative improvement solver.
Declaration
public IterativeSolver(ISolver<TWeight, TProblem, TObjective, TSolution, TFitness> solver, int n, SolverDelegates.StopConditionDelegate<TProblem, TObjective, TSolution> stopCondition, params IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>[] operators)
Parameters
|
ISolver<TWeight, TProblem, TObjective, TSolution, TFitness>
solver
|
|
System.Int32
n
|
|
SolverDelegates.StopConditionDelegate<TProblem, TObjective, TSolution>
stopCondition
|
|
IOperator<TWeight, TProblem, TObjective, TSolution, TFitness>[]
operators
|
Properties
Name
Returns the name of this solver.
Declaration
public override string Name { get; }
Property Value
|
System.String
|
Overrides
Itinero.Optimization.Algorithms.Solvers.SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.Name
Methods
Solve(TProblem, TObjective, out TFitness)
Solves the given problem.
Declaration
public override TSolution Solve(TProblem problem, TObjective objective, out TFitness bestFitness)
Parameters
|
TProblem
problem
The problem to solve. |
|
TObjective
objective
The objective to reach. |
|
TFitness
bestFitness
The fitness of the solution found. |
Returns
|
TSolution
|
Overrides
Itinero.Optimization.Algorithms.Solvers.SolverBase<TWeight, TProblem, TObjective, TSolution, TFitness>.Solve(TProblem, TObjective, TFitness)