Example #1
0
 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())
Example #2
0
 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)
Example #3
0
 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())
Example #4
0
 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)