Class representing edges of the Tangled Program Graphs.
More...
#include <tpgEdge.h>
|
| static uint64_t | getEdgeIDCounter () |
| | Get the current value of the edge ID counter.
|
| |
|
|
| TPGEdge ()=delete |
| | Delete the default constructor.
|
| |
|
|
static uint64_t | incrementeCounter () |
| | Incremente the edge ID counter and return the new value.
|
| |
| static void | resetEdgeIDCounter () |
| | Reset the edge ID counter.
|
| |
Class representing edges of the Tangled Program Graphs.
◆ TPGEdge()
Main constructor of the TPGEdge class.
This constructor does not register the created TPGEdge in the list of incoming or outgoing edges of the given TPGVertex.
- Parameters
-
| [in] | src | pointer to the source TPGVertex of the edge. |
| [in] | dest | pointer to the destination TPGVertex of the edge. |
| [in] | prog | the shared pointer to the Program associated to the edge. |
◆ getDestination()
◆ getEdgeID()
| uint64_t TPG::TPGEdge::getEdgeID |
( |
| ) |
const |
|
virtual |
Get the unique identifier of the TPGEdge.
- Returns
- the integer ID of the TPGEdge..
◆ getEdgeIDCounter()
| uint64_t TPG::TPGEdge::getEdgeIDCounter |
( |
| ) |
|
|
static |
Get the current value of the edge ID counter.
This method is mainly used for testing purpose to ensure that edge IDs are predictable.
- Returns
- the current value of the edge ID counter.
◆ getProgram()
◆ getProgramSharedPointer()
Get the shared_pointer to the Program.
This method is voluntarily non-const to make sure that only the TPGGraph containing the edge can use it.
- Returns
- a copy of the program attribute.
◆ getSource()
◆ resetEdgeIDCounter()
| void TPG::TPGEdge::resetEdgeIDCounter |
( |
| ) |
|
|
staticprotected |
Reset the edge ID counter.
This method set the ID counter to a new value. It can quickly lead to segmentation fault if not used carefully.
◆ setDestination()
| void TPG::TPGEdge::setDestination |
( |
TPGVertex * | newDestination | ) |
|
|
virtual |
◆ setEdgeID()
| void TPG::TPGEdge::setEdgeID |
( |
uint64_t | newID | ) |
|
|
virtual |
Set a new unique identifier to the TPGEdge.
- Parameters
-
| [in] | newID | the new integer ID to set to the TPGEdge. |
◆ setProgram()
| void TPG::TPGEdge::setProgram |
( |
const std::shared_ptr< Program::Program > | prog | ) |
const |
Set a new Program for the TPGEdge.
This method is const to enable use outside of the TPGGraph which is the only class accessing the non-const TPGEdge. Since the program pointer attribute is mutable, this method can successfully be used to alter the program.
- Parameters
-
| [in] | prog | the new shared pointer to a Program. |
◆ setSource()
| void TPG::TPGEdge::setSource |
( |
TPGVertex * | newSource | ) |
|
◆ program
Shared pointer to the Program to execute when evaluating the bid of this TPGEdge. This attribute is mutable to enable its modification during mutations.
The documentation for this class was generated from the following files:
- D:/a/gegelati/gegelati/gegelatilib/include/tpg/tpgEdge.h
- D:/a/gegelati/gegelati/gegelatilib/src/tpg/tpgEdge.cpp