An Edge connects a Node to itself or to another Node.
More...
#include <edge.h>
|
class | AbstractGraph |
|
class | TestEdge |
|
An Edge connects a Node to itself or to another Node.
This class wraps a std::shared_ptr<BaseEdge>.
- Note
- An edge should be created by an AbstractGraph derived object.
◆ Edge() [1/2]
evoplex::Edge::Edge |
( |
EdgePtr |
edge | ) |
|
Constructor.
- Parameters
-
edge | std::shared_ptr<BaseEdge> |
◆ Edge() [2/2]
evoplex::Edge::Edge |
( |
const std::pair< const int, Edge > & |
p | ) |
|
Constructor to ease range-based for loops.
- Parameters
-
◆ addAttr()
void evoplex::Edge::addAttr |
( |
QString |
name, |
|
|
Value |
value |
|
) |
| |
Appends the attribute name
with the value value
.
- Parameters
-
name | The attribute's name. |
value | The attribute's value. |
◆ attr() [1/2]
const Value& evoplex::Edge::attr |
( |
int |
id | ) |
const |
Gets the value of the attribute at id
.
- Parameters
-
- Exceptions
-
std::out_of_range | if the id is not present. |
◆ attr() [2/2]
Value evoplex::Edge::attr |
( |
const QString & |
name, |
|
|
Value |
defaultValue = Value() |
|
) |
| const |
Gets the value corresponding to name
.
- Parameters
-
name | The attribute's name. |
defaultValue | A Value to be returned if name is not present. |
◆ attrs()
Gets the edge's attributes.
◆ id()
int evoplex::Edge::id |
( |
| ) |
const |
◆ neighbour()
const Node& evoplex::Edge::neighbour |
( |
| ) |
const |
◆ origin()
const Node& evoplex::Edge::origin |
( |
| ) |
const |
◆ setAttr()
void evoplex::Edge::setAttr |
( |
const int |
id, |
|
|
const Value & |
value |
|
) |
| |
Sets the value at id
.
- Parameters
-
id | The attribute's id. |
value | The new attribute's value. |
- Exceptions
-
std::out_of_range | if the id is not present. |
The documentation for this class was generated from the following file:
- evoplex/src/core/include/edge.h