コード例 #1
0
 public VerticeInformationViewModel(int selectedIndex, NamedGraph graph, IEnumerable <int[]> cycles)
 {
     Index                 = selectedIndex;
     VerticeName           = graph[Index];
     ClusteringCoefficient = graph.ClusteringCoefficientFor(Index);
     VerticePerstige       = graph.GetPrestigeFor(Index);
     VerticeInfluence      = graph.GetInfluenceFor(Index);
     if (cycles != null)
     {
         IncludedInCyclesCount = cycles.Count(c => c.Any(v => v.Equals(selectedIndex)));
     }
 }