Beispiel #1
0
        static List <SubGraph> GeneratePotentialCliques(Dictionary <int, List <int> > graph)
        {
            var subGraphs = new List <SubGraph>();

            for (var i = 2; i <= graph.Count; i++)
            {
                var potentialCliques = GetKCombs(graph.Keys, i);
                foreach (var clique in potentialCliques)
                {
                    var subGraph = new SubGraph(graph.Where(x => clique.Contains(x.Key))
                                                .ToDictionary(x => x.Key, x => x.Value));
                    subGraphs.Add(subGraph);
                }
            }

            return(subGraphs);
        }
Beispiel #2
0
 static SubGraph NextSubGraph(Dictionary <int, List <int> > graph, SubGraph subGraph)
 {
 }