@@ -49,40 +49,40 @@ namespace dsm {
4949
5050 // / @brief Set the node's id
5151 // / @param id The node's id
52- inline void setId (Id id) { m_id = id; }
52+ void setId (Id id) { m_id = id; }
5353 // / @brief Set the node's coordinates
5454 // / @param coords A std::pair containing the node's coordinates (lat, lon)
55- inline void setCoords (std::pair<double , double > coords) {
55+ void setCoords (std::pair<double , double > coords) {
5656 m_coords = std::move (coords);
5757 }
5858 // / @brief Set the node's capacity
5959 // / @param capacity The node's capacity
60- inline virtual void setCapacity (Size capacity) { m_capacity = capacity; }
60+ virtual void setCapacity (Size capacity) { m_capacity = capacity; }
6161 // / @brief Set the node's transport capacity
6262 // / @param capacity The node's transport capacity
63- inline virtual void setTransportCapacity (Size capacity) {
63+ virtual void setTransportCapacity (Size capacity) {
6464 m_transportCapacity = capacity;
6565 }
6666 // / @brief Get the node's id
6767 // / @return Id The node's id
68- inline Id id () const { return m_id; }
68+ Id id () const { return m_id; }
6969 // / @brief Get the node's coordinates
7070 // / @return std::optional<std::pair<double, double>> A std::pair containing the node's coordinates
71- inline const std::optional<std::pair<double , double >>& coords () const {
71+ const std::optional<std::pair<double , double >>& coords () const {
7272 return m_coords;
7373 }
7474 // / @brief Get the node's capacity
7575 // / @return Size The node's capacity
76- inline Size capacity () const { return m_capacity; }
76+ Size capacity () const { return m_capacity; }
7777 // / @brief Get the node's transport capacity
7878 // / @return Size The node's transport capacity
79- inline Size transportCapacity () const { return m_transportCapacity; }
79+ Size transportCapacity () const { return m_transportCapacity; }
8080
81- inline virtual bool isFull () const = 0;
81+ virtual bool isFull () const = 0;
8282
83- inline virtual bool isIntersection () const noexcept { return false ; }
84- inline virtual bool isTrafficLight () const noexcept { return false ; }
85- inline virtual bool isRoundabout () const noexcept { return false ; }
83+ virtual bool isIntersection () const noexcept { return false ; }
84+ virtual bool isTrafficLight () const noexcept { return false ; }
85+ virtual bool isRoundabout () const noexcept { return false ; }
8686 };
8787
8888 // / @brief The Intersection class represents a node in the network.
@@ -130,35 +130,35 @@ namespace dsm {
130130 void removeAgent (Id agentId);
131131 // / @brief Set the node streets with priority
132132 // / @param streetPriorities A std::set containing the node's street priorities
133- inline void setStreetPriorities (std::set<Id> streetPriorities) {
133+ void setStreetPriorities (std::set<Id> streetPriorities) {
134134 m_streetPriorities = std::move (streetPriorities);
135135 }
136136 // / @brief Add a street to the node street priorities
137137 // / @param streetId The street's id
138- inline void addStreetPriority (Id streetId) { m_streetPriorities.emplace (streetId); }
138+ void addStreetPriority (Id streetId) { m_streetPriorities.emplace (streetId); }
139139
140140 // / @brief Returns true if the node is full
141141 // / @return bool True if the node is full
142- inline bool isFull () const override { return m_agents.size () == this ->m_capacity ; }
142+ bool isFull () const override { return m_agents.size () == this ->m_capacity ; }
143143
144144 // / @brief Get the node's street priorities
145145 // / @details This function returns a std::set containing the node's street priorities.
146146 // / If a street has priority, it means that the agents that are on that street
147147 // / have priority over the agents that are on the other streets.
148148 // / @return std::set<Id> A std::set containing the node's street priorities
149- inline virtual const std::set<Id>& streetPriorities () const {
149+ virtual const std::set<Id>& streetPriorities () const {
150150 return m_streetPriorities;
151151 };
152152 // / @brief Get the node's agent ids
153153 // / @return std::set<Id> A std::set containing the node's agent ids
154- inline const std::multimap<int16_t , Id>& agents () { return m_agents; };
154+ const std::multimap<int16_t , Id>& agents () { return m_agents; };
155155 // / @brief Returns the number of agents that have passed through the node
156156 // / @return Size The number of agents that have passed through the node
157157 // / @details This function returns the number of agents that have passed through the node
158158 // / since the last time this function was called. It also resets the counter.
159159 Size agentCounter ();
160160
161- inline virtual bool isIntersection () const noexcept override final { return true ; }
161+ virtual bool isIntersection () const noexcept override final { return true ; }
162162 };
163163
164164 template <typename Delay>
@@ -208,12 +208,12 @@ namespace dsm {
208208 // / @brief Set the node's left turn ratio
209209 // / @param first The first component of the left turn ratio
210210 // / @param second The second component of the left turn ratio
211- inline void setLeftTurnRatio (double const first, double const second) {
211+ void setLeftTurnRatio (double const first, double const second) {
212212 setLeftTurnRatio (std::make_pair (first, second));
213213 }
214214 // / @brief Set the node's left turn ratio as std::pair(ratio, ratio)
215215 // / @param ratio The left turn ratio
216- inline void setLeftTurnRatio (double const ratio) {
216+ void setLeftTurnRatio (double const ratio) {
217217 setLeftTurnRatio (std::make_pair (ratio, ratio));
218218 }
219219 // / @brief Increase the node's counter
@@ -233,7 +233,7 @@ namespace dsm {
233233 Delay counter () const { return m_counter; }
234234 // / @brief Get the node's left turn ratio
235235 // / @return std::optional<std::pair<double, double>> The node's left turn ratio
236- inline std::optional<std::pair<double , double >> leftTurnRatio () const {
236+ std::optional<std::pair<double , double >> leftTurnRatio () const {
237237 return m_leftTurnRatio;
238238 }
239239 // / @brief Returns true if the traffic light is green
@@ -389,14 +389,14 @@ namespace dsm {
389389 dsm::queue<Id> m_agents;
390390
391391 public:
392- inline Roundabout () = default;
392+ Roundabout () = default ;
393393 // / @brief Construct a new Roundabout object
394394 // / @param id The node's id
395- inline explicit Roundabout (Id id) : Node{id} {};
395+ explicit Roundabout (Id id) : Node{id} {};
396396 // / @brief Construct a new Roundabout object
397397 // / @param id The node's id
398398 // / @param coords A std::pair containing the node's coordinates
399- inline Roundabout (Id id, std::pair<double , double > coords) : Node{id, coords} {};
399+ Roundabout (Id id, std::pair<double , double > coords) : Node{id, coords} {};
400400 // / @brief Construct a new Roundabout object
401401 // / @param node An Intersection object
402402 Roundabout (const Node& node);
@@ -412,14 +412,14 @@ namespace dsm {
412412 Id dequeue ();
413413 // / @brief Get the node's queue
414414 // / @return dsm::queue<Id> The node's queue
415- inline const dsm::queue<Id>& agents () const { return m_agents; }
415+ const dsm::queue<Id>& agents () const { return m_agents; }
416416
417417 // / @brief Returns true if the node is full
418418 // / @return bool True if the node is full
419- inline bool isFull () const override { return m_agents.size () == this ->m_capacity ; }
419+ bool isFull () const override { return m_agents.size () == this ->m_capacity ; }
420420 // / @brief Returns true if the node is a roundabout
421421 // / @return bool True if the node is a roundabout
422- inline bool isRoundabout () const noexcept override { return true ; }
422+ bool isRoundabout () const noexcept override { return true ; }
423423 };
424424
425425}; // namespace dsm
0 commit comments