Example #1
0
def main():
    #test prep
    graph = btg.build_graph()
    # call to main algorithm method
    graph_partition = infomap(graph)
    print graph_partition
    print len(set(graph_partition[0].values()))
    def test_simple_graph(self):
        graph  = btg.build_graph()
        result = infomap.get_best_module(graph)
        len_res = get_result_len(result.values())

        self.assertEqual(len_res, 2)
    def test_simple_graph(self):
        graph = btg.build_graph()
        result = infomap.get_best_module(graph)
        len_res = get_result_len(result.values())

        self.assertEqual(len_res, 2)