|
Dynamical System Framework
|
Public Member Functions | |
| Edge (Id id, std::pair< Id, Id > nodePair, geometry::PolyLine geometry={}) | |
| Construct a new Edge object. | |
| Edge (Edge &&)=default | |
| Edge (const Edge &)=delete | |
| void | setGeometry (geometry::PolyLine geometry) |
| Set the edge's geometry. | |
| void | setAttribute (std::string const &name, std::variant< std::monostate, bool, std::int64_t, double, std::string > const &value) |
| Set an attribute for the edge. | |
| auto | id () const |
| Get the edge's id. | |
| auto | source () const |
| Get the edge's source node id. | |
| auto | target () const |
| Get the edge's target node id. | |
| auto const & | nodePair () const |
| Get the edge's node pair. | |
| auto const & | geometry () const |
| Get the edge's geometry. | |
| auto | angle () const |
| Get the edge's angle, in radians, between the source and target nodes. | |
| auto const & | attributes () const |
| Get the edge's attributes. | |
| template<typename T> | |
| std::optional< T > | getAttribute (std::string const &name) const |
| Get an attribute of the edge by name. | |
| virtual bool | isFull () const =0 |
| virtual bool | isActive () const |
| double | deltaAngle (double const previousEdgeAngle) const |
Protected Member Functions | |
| void | m_setAngle (geometry::Point srcNodeCoordinates, geometry::Point dstNodeCoordinates) |
Protected Attributes | |
| geometry::PolyLine | m_geometry |
| Id | m_id |
| std::pair< Id, Id > | m_nodePair |
| double | m_angle |
| std::unordered_map< std::string, std::variant< std::monostate, bool, std::int64_t, double, std::string > > | m_attributes |
| dsf::Edge::Edge | ( | Id | id, |
| std::pair< Id, Id > | nodePair, | ||
| geometry::PolyLine | geometry = {} ) |
Construct a new Edge object.
| id | The edge's id |
| nodePair | The edge's node pair (u, v) with the edge u -> v |
| geometry | The edge's geometry, a vector of pairs of doubles representing the coordinates of the edge's geometry. Default is an empty vector. |
|
inline |
Get the edge's angle, in radians, between the source and target nodes.
|
inline |
Get the edge's attributes.
|
inline |
Get the edge's geometry.
|
inline |
Get an attribute of the edge by name.
| T | The expected type of the attribute's value |
| name | The attribute's name |
|
inline |
Get the edge's id.
|
inlinevirtual |
Reimplemented in dsf::mobility::Road.
|
pure virtual |
Implemented in dsf::mobility::Road.
|
inline |
Get the edge's node pair.
| void dsf::Edge::setAttribute | ( | std::string const & | name, |
| std::variant< std::monostate, bool, std::int64_t, double, std::string > const & | value ) |
Set an attribute for the edge.
| name | The attribute's name |
| value | The attribute's value |
| void dsf::Edge::setGeometry | ( | geometry::PolyLine | geometry | ) |
Set the edge's geometry.
| geometry | dsf::geometry::PolyLine The edge's geometry, a vector of pairs of doubles representing the coordinates of the edge's geometry |
|
inline |
Get the edge's source node id.
|
inline |
Get the edge's target node id.