def compute_path(self, origin: int, destination: int) -> None: """ Computes the path between two nodes in the network Args: *origin* (:obj:`int`): Origin for the path *destination* (:obj:`int`): Destination for the path """ path_computation(origin, destination, self.graph, self)
def compute_path(self, origin: int, destination: int) -> None: """ Computes the path between two nodes in the network Args: *origin* (:obj:`int`): Origin for the path *destination* (:obj:`int`): Destination for the path """ if self.graph is None: raise Exception( 'You need to set graph skimming before you compute a path') path_computation(origin, destination, self.graph, self) if self.graph.skim_fields: self.skims.fill(np.inf) self.skims[self.graph.all_nodes, :] = self._skimming_array[:-1, :] self.skims[self.skims > self.__graph_sum] = np.inf