public TravelSalesmanScenarioGenerator(int nodes, float maxPathLength) { Nodes = nodes; DistancesVector = new float[Nodes, Nodes]; for (int i = 0; i < Nodes; i++) { for (int j = 0; j < Nodes; j++) { DistancesVector[i, j] = DistancesVector[j, i] = RandomGenerator.GetInstance().GetRandom(0, maxPathLength); } } Individual = new TravelSalesmanScenario(DistancesVector, maxPathLength); }
public TravelSalesmanScenarioGenerator(float[,] DistancesVector, int nodes, float maxPathLength) { Nodes = nodes; Individual = new TravelSalesmanScenario(DistancesVector, maxPathLength); }