@@ -32,30 +32,34 @@ namespace dsf {
3232 Edge (const Edge&) = delete ;
3333 virtual ~Edge () = default ;
3434
35- void resetId (Id newId);
35+ // / @brief Set the edge's geometry
36+ // / @param geometry dsf::geometry::PolyLine The edge's geometry, a vector of pairs of doubles representing the coordinates of the edge's geometry
3637 void setGeometry (geometry::PolyLine geometry);
38+ // / @brief Set the edge's weight
39+ // / @param weight The edge's weight
40+ // / @throws std::invalid_argument if the weight is less or equal to 0
3741 void setWeight (double const weight);
3842
3943 // / @brief Get the edge's id
4044 // / @return Id The edge's id
41- Id id () const ;
45+ inline auto id () const { return m_id; }
4246 // / @brief Get the edge's source node id
4347 // / @return Id The edge's source node id
44- Id source () const ;
48+ inline auto source () const { return m_nodePair. first ; }
4549 // / @brief Get the edge's target node id
4650 // / @return Id The edge's target node id
47- Id target () const ;
51+ inline auto target () const { return m_nodePair. second ; }
4852 // / @brief Get the edge's node pair
4953 // / @return std::pair<Id, Id> The edge's node pair, where the first element is the source node id and the second
5054 // / element is the target node id. The pair is (u, v) with the edge u -> v.
51- std::pair<Id, Id> const & nodePair () const ;
55+ inline auto const & nodePair () const { return m_nodePair; }
5256 // / @brief Get the edge's geometry
5357 // / @return dsf::geometry::PolyLine The edge's geometry, a vector of pairs of doubles representing the coordinates of the edge's geometry
54- geometry::PolyLine const & geometry () const ;
58+ inline auto const & geometry () const { return m_geometry; }
5559
5660 // / @brief Get the edge's angle, in radians, between the source and target nodes
5761 // / @return double The edge's angle, in radians
58- double angle () const ;
62+ inline auto angle () const { return m_angle; }
5963 // / @brief Get the edge's weight
6064 // / @return double The edge's weight
6165 double weight () const ;
0 commit comments