Defined in dot.hpp
.
This nested struct represents an edge in the represented graph.
|
| Edge ()=default |
| Default constructor.
|
|
| Edge (Edge &&)=default |
| Default move constructor.
|
|
| Edge (Edge const &)=default |
| Default copy constructor.
|
|
template<typename Thing1, typename Thing2> |
| Edge (Thing1 &&h, Thing2 &&t) |
| Construct from head and tail.
|
|
template<typename Thing1, typename Thing2> |
Edge & | add_attr (Thing1 &&key, Thing2 &&val) |
| Add an attribute to an edge.
|
|
Edge & | operator= (Edge &&)=default |
| Default move assignment.
|
|
Edge & | operator= (Edge const &)=default |
| Default copy assignment.
|
|
◆ Edge()
template<typename Thing1, typename Thing2>
Edge |
( |
Thing1 && | h, |
|
|
Thing2 && | t ) |
|
inline |
This constructor creates a new Edge object with head h
(converted to a std::string using std::to_string if thing
is not already a std::string, std::string_view, or char const*
) and tail t
(similarly converted to a std::string).
The newly constructed Edge has no attributes set.
- Template Parameters
-
Thing | the type of the argument. |
- Parameters
-
h | the head of the edge. |
t | the tail of the edge. |
◆ add_attr()
template<typename Thing1, typename Thing2>
Edge & add_attr |
( |
Thing1 && | key, |
|
|
Thing2 && | val ) |
|
inline |
This function adds a new attribute, or replaces the value of an existing attribute of an Edge. The arguments key
and val
are converted to std::string (unless they are std::string, std::string_view, or char const*
already).
- Template Parameters
-
Thing1 | the type of the first argument. |
Thing2 | the type of the second argument. |
- Parameters
-
key | the name of the attribute. |
val | the value of the attribute. |
- Returns
- A reference to
this
.
- Warning
- No checks of any kind are performed that the string representations of
key
or val
are valid in DOT; see the Graphviz documentation for more details.
◆ to_human_readable_repr()
The documentation for this struct was generated from the following file:
- /home/joseph/Dev/Comp_Maths/testing/libsemigroups/include/libsemigroups/dot.hpp