Show / Hide Table of Contents

Class Random1Shift<TObjective>

An operator to execute n random 1-shift* relocations.

Inheritance
System.Object
Random1Shift<TObjective>
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class Random1Shift<TObjective> : IPerturber<float, TSPTWProblem, TObjective, Tour, float> where TObjective : ObjectiveBase<TSPTWProblem, Tour, float>
Type Parameters
TObjective

Remarks
  • 1-shift: Remove a customer and relocate it somewhere.

Properties

Name

Returns the name of the operator.

Declaration
public string Name { get; }
Property Value
System.String

Methods

Apply(TSPTWProblem, TObjective, Tour, Int32, out Single)

Returns true if there was an improvement, false otherwise.

Declaration
public bool Apply(TSPTWProblem problem, TObjective objective, Tour tour, int level, out float difference)
Parameters
TSPTWProblem problem

TObjective objective

Tour tour

System.Int32 level

System.Single difference

Returns
System.Boolean

Apply(TSPTWProblem, TObjective, Tour, out Single)

Returns true if there was an improvement, false otherwise.

Declaration
public bool Apply(TSPTWProblem problem, TObjective objective, Tour tour, out float difference)
Parameters
TSPTWProblem problem

TObjective objective

Tour tour

System.Single difference

Returns
System.Boolean

Supports(TObjective)

Returns true if the given objective is supported.

Declaration
public bool Supports(TObjective objective)
Parameters
TObjective objective

Returns
System.Boolean

Back to top Built by Itinero, MIT licensed.