Пример #1
0
 def gen_graph(self, graph_name):
     # check whether we are loading from file
     if "." in graph_name:
         abspath = network_dir + graph_name
         di_instructions = self.parser.get_graph_options(graph_name)
         graph = nngt.Graph.from_file(abspath, **di_instructions)
         graph.set_name(graph_name)
         return graph, None
     else:
         di_instructions = self.parser.get_graph_options(graph_name)
         graph = nngt.generate(di_instructions)
         graph.set_name(graph_name)
         graph.to_file(current_dir + graph_name + '.el')
         return graph, di_instructions
Пример #2
0
 def gen_graph(self, graph_name):
     di_instructions = self.parser.get_graph_options(graph_name)
     graph = nngt.generate(di_instructions)
     graph.set_name(graph_name)
     return graph, di_instructions
Пример #3
0
 def gen_graph(self, graph_name):
     di_instructions = self.parser.get_graph_options(graph_name)
     graph = nngt.generate(di_instructions)
     graph.set_name(graph_name)
     return graph, di_instructions
Пример #4
0
 def gen_graph(self, graph_name):
     di_instructions = self.parser.get_graph_options(graph_name)
     graph = nngt.generate(di_instructions)
     if nngt.on_master_process():
         graph.set_name(graph_name)
     return graph, di_instructions