This page contains documentation related to converting a libsemigroups object into WordGraph instances.
Functions | |
| template<template< typename... > typename Result> | |
| auto | to (Forest const &f) -> std::enable_if_t< std::is_same_v< Result< int >, WordGraph< int > >, WordGraph< Forest::node_type > > |
| Convert a Forest to a WordGraph. | |
| template<template< typename... > typename Result, typename Node> | |
| auto | to (WordGraphView< Node > const &view) -> std::enable_if_t< std::is_same_v< Result< Node >, WordGraph< Node > >, WordGraph< Node > > |
| Convert a WordGraphView to a WordGraph. | |
| auto to | ( | Forest const & | f | ) | -> std::enable_if_t< std::is_same_v< Result< int >, WordGraph< int > >, WordGraph< Forest::node_type > > |
Defined in to-word-graph.hpp.
Despite the hideous signature, this function should be invoked as follows:
where f is a Forest object. The returned WordGraph object is isomorphic as a graph to f.
| Result | used for SFINAE should be WordGraph. |
| f | the Forest instance to convert. |
f. | auto to | ( | WordGraphView< Node > const & | view | ) | -> std::enable_if_t< std::is_same_v< Result< Node >, WordGraph< Node > >, WordGraph< Node > > |
Defined in to-word-graph.hpp.
Despite the hideous signature, this function should be invoked as follows:
where view is a WordGraphView object. The returned WordGraph only contains those nodes and edges that are covered by view.
| Result | used for SFINAE. Should be WordGraph. |
| view | the WordGraphView instance to convert. |
| LibsemigroupsException | if view is in an invalid state, or if the underlying graph has edges which crossed the boundaries of the view. |