This page contains documentation related to safely constructing a WordGraph instance.
- See also
- The `make` function for an overview of possible uses of the
make function.
|
| template<typename Return> |
| std::enable_if_t< is_specialization_of_v< Return, WordGraph >, Return > | make (size_t num_nodes, std::initializer_list< std::vector< typename Return::node_type > > targets) |
| | Constructs a word graph from a number of nodes and targets.
|
| |
| template<typename Return> |
| std::enable_if_t< is_specialization_of_v< Return, WordGraph >, Return > | make (size_t num_nodes, std::vector< std::vector< typename Return::node_type > > const &targets) |
| | Constructs a word graph from a number of nodes and targets.
|
| |
| template<typename Return> |
| std::enable_if_t< is_specialization_of_v< Return, WordGraph >, Return > | make (size_t num_nodes, std::initializer_list< std::vector< typename Return::node_type > > targets) |
| | Constructs a word graph from a number of nodes and targets.
|
| |
| template<typename Return> |
| std::enable_if_t< is_specialization_of_v< Return, WordGraph >, Return > | make (size_t num_nodes, std::vector< std::vector< typename Return::node_type > > const &targets) |
| | Constructs a word graph from a number of nodes and targets.
|
| |
◆ make() [1/4]
template<typename Return>
This function constructs a word graph from its arguments whose out-degree is specified by the length of the first item in the second parameter, or 0 if the second parameter is empty.
- Template Parameters
-
- Parameters
-
| num_nodes | the number of nodes in the word graph. |
| targets | the targets of the word graph. |
- Returns
- A value of type WordGraph.
- Exceptions
-
- Complexity
- \(O(mn)\) where \(m\) is the length of
targets and \(n\) is the parameter num_nodes.
- Example
enable_if_is_same< Return, Blocks > make(Container const &cont)
Check the arguments, construct a Blocks object, and check it.
Definition bipart.hpp:856
- Note
- This function will be moved from the header
word-graph.hpp to word-graph-helpers.hpp in v4 of libsemigroups.
◆ make() [2/4]
template<typename Return>
This function constructs a word graph from its arguments whose out-degree is specified by the length of the first item in the second parameter, or 0 if the second parameter is empty.
- Template Parameters
-
- Parameters
-
| num_nodes | the number of nodes in the word graph. |
| targets | the targets of the word graph. |
- Returns
- A value of type WordGraph.
- Exceptions
-
- Complexity
- \(O(mn)\) where \(m\) is the length of
targets and \(n\) is the parameter num_nodes.
- Example
- Note
- This function will be moved from the header
word-graph.hpp to word-graph-helpers.hpp in v4 of libsemigroups.
◆ make() [3/4]
template<typename Return>
This function constructs a word graph from its arguments whose out-degree is specified by the length of the first item in the second parameter, or 0 if the second parameter is empty.
- Template Parameters
-
- Parameters
-
| num_nodes | the number of nodes in the word graph. |
| targets | the targets of the word graph. |
- Returns
- A value of type WordGraph.
- Exceptions
-
- Complexity
- \(O(mn)\) where \(m\) is the length of
targets and \(n\) is the parameter num_nodes.
- Example
std::enable_if_t< is_specialization_of_v< Return, WordGraph >, Return > make(size_t num_nodes, std::initializer_list< std::vector< typename Return::node_type > > targets)
Constructs a word graph from a number of nodes and targets.
◆ make() [4/4]
template<typename Return>
This function constructs a word graph from its arguments whose out-degree is specified by the length of the first item in the second parameter, or 0 if the second parameter is empty.
- Template Parameters
-
- Parameters
-
| num_nodes | the number of nodes in the word graph. |
| targets | the targets of the word graph. |
- Returns
- A value of type WordGraph.
- Exceptions
-
- Complexity
- \(O(mn)\) where \(m\) is the length of
targets and \(n\) is the parameter num_nodes.
- Example
-