priops.pathfinder

priops.Pathfinder

class priops.pathfinder.NoPath[source]

Bases: exceptions.TypeError

class priops.pathfinder.Pathfinder(priop, max_components=None, max_weight=None)[source]

An algorithm for finding a path through the graph defined by a Priop.

__init__(priop, max_components=None, max_weight=None)[source]

Sets the Pathfinder up to search for pathes in priop with parameters max_components and max_steps. max_components gives the maximum number of edges to combine into the path. max_weight gives the maximum weight of a path to be considered.

The default for max_components is 1 and the default for max_weight is one.

find_path(input_node, output_node)[source]

Finds a best path to traverse self.priop from input node input_node to output node output_node.

Table Of Contents

Previous topic

priops.priop

Next topic

priops.callable

This Page