示例#1
0
 private void ChangeLocation(int iterator)
 {
     _visited.Add(_currentLocation.Neighbors[iterator]);
     _lengthOfRoad   += _currentLocation.Neighbors[iterator].Cost;
     _currentLocation = _currentLocation == _currentLocation.Neighbors[iterator].FirstNode
         ? _currentLocation.Neighbors[iterator].SecondNode
         : _currentLocation.Neighbors[iterator].FirstNode;
     _probabilities = FindWay();
 }
示例#2
0
文件: Graph.cs 项目: Rhenin/AntColony
 private void AddEdge(int value)
 {
     _edges.Add(new Edge(value));
 }