wlplan.graph_generator
- class GraphGenerator
- get_n_features(self: _wlplan.graph_generator.GraphGenerator) int
- get_n_relations(self: _wlplan.graph_generator.GraphGenerator) int
- set_problem(self: _wlplan.graph_generator.GraphGenerator, problem: _wlplan.planning.Problem) None
- to_graph(*args, **kwargs)
Overloaded function.
to_graph(self: _wlplan.graph_generator.GraphGenerator, state: _wlplan.planning.State) -> _wlplan.graph_generator.Graph
to_graph(self: _wlplan.graph_generator.GraphGenerator, state: _wlplan.planning.State, actions: list[_wlplan.planning.Action]) -> _wlplan.graph_generator.Graph
- to_graphs(self: _wlplan.graph_generator.GraphGenerator, dataset: _wlplan.data.DomainDataset) list[_wlplan.graph_generator.Graph]
- from_networkx(graph: Graph) Graph
Converts a NetworkX graph to a WLPlan graph.
- Parameters:
graph (nx.Graph) – Input NetworkX graph.
- Returns:
Graph
- Return type:
Output WLPlan graph.
- Raises:
ValueError – If node colours or edge labels are not specified in the graph attributes.:
- get_available_graph_generators() list[str]
- init_graph_generator(graph_representation: str, domain: Domain, differentiate_constant_objects: bool = True) GraphGenerator
Returns a graph generator based on the specified graph representation.
- Parameters:
graph_representation (str) – The graph encoding of planning states used.
domain (Domain) – The input domain.
differentiate_constant_objects (bool, default=True) – Choose to assign different colours to constant domain objects for supported graphs.
- Returns:
GraphGenerator
- Return type:
The instantiated graph generator.
- Raises:
ValueError – If a specified argument is unknown.:
- to_networkx(graph: Graph) Graph
Converts a WLPlan graph to a NetworkX graph.
- Parameters:
graph (nx.Graph) – Input WLPlan graph.
- Returns:
Graph
- Return type:
Output NetworkX graph.