コード例 #1
0
ファイル: test_io.py プロジェクト: MalloryDazza/NNGT
 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
ファイル: test_generation.py プロジェクト: Silmathoron/NNGT
 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
ファイル: test_mpi.py プロジェクト: SBottani/NNGT
 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