The Node class represents the concept of a node in the network.
More...
#include <Node.hpp>
|
|
Id | m_id |
|
std::optional< geometry::Point > | m_geometry |
|
std::string | m_name |
|
std::vector< Id > | m_ingoingEdges |
|
std::vector< Id > | m_outgoingEdges |
|
std::optional< double > | m_betweennessCentrality {std::nullopt} |
The Node class represents the concept of a node in the network.
- Template Parameters
-
| Id | The type of the node's id |
| Size | The type of the node's capacity |
◆ Node() [1/2]
Construct a new Node object with capacity 1.
- Parameters
-
◆ Node() [2/2]
Construct a new Node object with capacity 1.
- Parameters
-
◆ addIngoingEdge()
| void dsf::Node::addIngoingEdge |
( |
Id | edgeId | ) |
|
|
inline |
Add an ingoing edge to the node.
- Parameters
-
- Exceptions
-
| std::invalid_argument | if the edge already exists in the ingoing edges |
◆ addOutgoingEdge()
| void dsf::Node::addOutgoingEdge |
( |
Id | edgeId | ) |
|
|
inline |
Add an outgoing edge to the node.
- Parameters
-
- Exceptions
-
| std::invalid_argument | if the edge already exists in the outgoing edges |
◆ betweennessCentrality()
| auto const & dsf::Node::betweennessCentrality |
( |
| ) |
const |
|
inlinenoexcept |
Get the node's betweenness centrality.
- Returns
- std::optional<double> The node's betweenness centrality, or std::nullopt if not set
◆ geometry()
| auto const & dsf::Node::geometry |
( |
| ) |
const |
|
inlinenoexcept |
Get the node's geometry.
- Returns
- std::optional<geometry::Point> A geometry::Point
◆ id()
| auto dsf::Node::id |
( |
| ) |
const |
|
inline |
Get the node's id.
- Returns
- Id The node's id
◆ ingoingEdges()
| auto const & dsf::Node::ingoingEdges |
( |
| ) |
const |
|
inlinenoexcept |
Get the node's ingoing edges.
- Returns
- std::vector<Id> A vector of the node's ingoing edge ids
◆ name()
| auto const & dsf::Node::name |
( |
| ) |
const |
|
inlinenoexcept |
Get the node's name.
- Returns
- std::string The node's name
◆ outgoingEdges()
| auto const & dsf::Node::outgoingEdges |
( |
| ) |
const |
|
inlinenoexcept |
Get the node's outgoing edges.
- Returns
- std::vector<Id> A vector of the node's outgoing edge ids
◆ setBetweennessCentrality()
| void dsf::Node::setBetweennessCentrality |
( |
double const | betweennessCentrality | ) |
|
|
inlinenoexcept |
Set the node's betweenness centrality.
- Parameters
-
◆ setGeometry()
Set the node's geometry.
- Parameters
-
◆ setId()
| void dsf::Node::setId |
( |
Id | id | ) |
|
|
inlinenoexcept |
Set the node's id.
- Parameters
-
◆ setName()
| void dsf::Node::setName |
( |
const std::string & | name | ) |
|
|
inlinenoexcept |
Set the node's name.
- Parameters
-
The documentation for this class was generated from the following file: