def move_to(self, path, **options):
    'Changes the state of the graph by moving along the path specified'
    defaults = {'debug': False, 'verbose': False}
    move_options = {}
    for (key, value) in defaults.items():
        move_options[key] = value
    for (key, value) in options.items():
        move_options[key] = value
    if move_options['debug']:
        print(path)
    for (index, edge) in enumerate(path):
        edge_pattern = 'edge_(?P<begin_node>\\w+)_(?P<end_node>\\w+)_(?P<iterator>\\w+)'
        match = re.match(edge_pattern, edge)
        begin_node = match.groupdict()['begin_node']
        end_node = match.groupdict()['end_node']
        if move_options['verbose']:
            print('moving {0} -> {1}'.format(begin_node, end_node))
        self.data = self.__dict__[edge](self.data)
        self.current_node = match.groupdict()['end_node']
        self.state = [0 for i in range(len(self.node_names))]
        position = self.node_names.index(self.current_node)
        self.state[position] = 1
        self.state_matrix = np.matrix(self.state).T
Changes the state of the graph by moving along the path specified
def move_to(self, path, **options):
    
    defaults = {'debug': False, 'verbose': False}
    move_options = {}
    for (key, value) in defaults.items():
        move_options[key] = value
    for (key, value) in options.items():
        move_options[key] = value
    if move_options['debug']:
        print(path)
    for (index, edge) in enumerate(path):
        edge_pattern = 'edge_(?P<begin_node>\\w+)_(?P<end_node>\\w+)_(?P<iterator>\\w+)'
        match = re.match(edge_pattern, edge)
        begin_node = match.groupdict()['begin_node']
        end_node = match.groupdict()['end_node']
        if move_options['verbose']:
            print('moving {0} -> {1}'.format(begin_node, end_node))
        self.data = self.__dict__[edge](self.data)
        self.current_node = match.groupdict()['end_node']
        self.state = [0 for i in range(len(self.node_names))]
        position = self.node_names.index(self.current_node)
        self.state[position] = 1
        self.state_matrix = np.matrix(self.state).T