public Object Clone() { EdgesInformation clone = new EdgesInformation(); clone.existingEdges = new List <KeyValuePair <int, int> >(this.existingEdges); clone.nonExistingEdges = new List <KeyValuePair <int, int> >(this.nonExistingEdges); return(clone); }
public void InitializeEvolutionInformation() { Debug.Assert(evolutionInformation == null); evolutionInformation = new EdgesInformation(); for (int i = 0; i < Size; ++i) { for (int j = i + 1; j < Size; ++j) { KeyValuePair <int, int> e = new KeyValuePair <int, int>(i, j); if (AreConnected(i, j)) { evolutionInformation.existingEdges.Add(e); } else { evolutionInformation.nonExistingEdges.Add(e); } } } }