Пример #1
0
 def draw_layer(self):
     print utils.string_to_exact_len(self.options['name'], 12),
     print ' | ',
     for node in self.nodes:
         print utils.string_to_exact_len(round(node.activation_level, 2), 20),
         print ' | ',
     print
Пример #2
0
 def draw_layer(self):
     print utils.string_to_exact_len(self.options['name'], 12),
     print ' | ',
     for node in self.nodes:
         print utils.string_to_exact_len(round(node.activation_level, 2),
                                         20),
         print ' | ',
     print
Пример #3
0
 def draw_links(self):
     for link in self.links_out:
         if not link.options['display']: continue
         print utils.string_to_exact_len(link.options['name'], 13),
         for arcrow in link.arcs:
             if not arcrow[0]: continue
             print ' | ',
             for arc in arcrow:
                 if arc: print utils.string_to_exact_len(round(arc.weight, 2), 5),
                 else: print ' ' * 5,
                 print ' | ',
             print
             print ' ' * 13,
         print "\n"            
Пример #4
0
 def draw_links(self):
     for link in self.links_out:
         if not link.options['display']: continue
         print utils.string_to_exact_len(link.options['name'], 13),
         for arcrow in link.arcs:
             if not arcrow[0]: continue
             print ' | ',
             for arc in arcrow:
                 if arc:
                     print utils.string_to_exact_len(
                         round(arc.weight, 2), 5),
                 else:
                     print ' ' * 5,
                 print ' | ',
             print
             print ' ' * 13,
         print "\n"