public override sealed void AddFreeVertexToTreil(int colonyIndex, Vertex vertix) { FreeVertices.Remove(vertix); Treil[colonyIndex].Add(vertix); WeightOfColonies[colonyIndex]++; //Log.DebugFormat($"Vertex <{vertix.Index}> add for colony <{colonyIndex}>"); PassedVertices.Add(vertix); }
public void AddFreeVertexToTreil(int colonyIndex, Vertex vertix) { FreeVertices.Remove(vertix); Treil[colonyIndex].Add(vertix); Log.DebugFormat($"Vertex i: {vertix.Index}, w: {vertix.Weight}"); var currentWeightOfColony = WeightOfColonies[colonyIndex]; WeightOfColonies[colonyIndex] = currentWeightOfColony + vertix.Weight; foreach (var passedVertex in Treil[colonyIndex]) { EdgesWeightOfColonies[colonyIndex] += _graph.EdgesWeights[passedVertex.Index, vertix.Index]; } PassedVertices.Add(vertix); }