def test_graph_factory_input_filestream(self): print("--- Read Graph from File ---") fact = MI.GraphFactory() fin = MI.PyHelper().GetInputFileStream(TEST_GRAPH) gf = fact.Build(fin) print("Node:%d" % gf.GetN()) print("Edge:%d" % gf.GetM())
def test_graph_general_cascade(self): print("--- General Cascade ---") fact = MI.GraphFactory() fin = MI.PyHelper().GetInputFileStream(TEST_GRAPH) gf = fact.Build(fin) gc = MI.GeneralCascade() gc.Build(gf)
def test_graph_factory_stdin(self): # this is static print("--- Read Graph from stdin ---") fact = MI.GraphFactory() stdin = MI.PyHelper().GetStdin() gf = fact.Build(stdin) print("Node:%d" % gf.GetN()) print("Edge:%d" % gf.GetM())
def setUp(self): fact = MI.GraphFactory() fin = MI.PyHelper().GetInputFileStream(TEST_GRAPH) self.gf = fact.Build(fin) self.gc = MI.GeneralCascade() self.gc.Build(self.gf)