Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
ODMatrix::descending_departure_comperator Class Reference

Used for sorting vehicles by their departure (latest first) More...

Public Member Functions

 descending_departure_comperator ()
 constructor
 
bool operator() (const ODVehicle &p1, const ODVehicle &p2) const
 Comparing operator.
 

Detailed Description

Used for sorting vehicles by their departure (latest first)

A reverse operator to what may be expected is used in order to allow prunning the sorted vector from its tail.

Definition at line 425 of file ODMatrix.h.

Constructor & Destructor Documentation

◆ descending_departure_comperator()

ODMatrix::descending_departure_comperator::descending_departure_comperator ( )
inline

constructor

Definition at line 428 of file ODMatrix.h.

Member Function Documentation

◆ operator()()

bool ODMatrix::descending_departure_comperator::operator() ( const ODVehicle p1,
const ODVehicle p2 
) const
inline

Comparing operator.

Compares two vehicles by their departure time

Parameters
[in]p1First vehicle to compare
[in]p2Second vehicle to compare
Returns
Whether the departure time of the first vehicle is larger than the one of the second

Definition at line 439 of file ODMatrix.h.

References ODMatrix::ODVehicle::depart, and ODMatrix::ODVehicle::id.


The documentation for this class was generated from the following file: