SUMO - Simulation of Urban MObility
ODMatrix::descending_departure_comperator Class Reference

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

Collaboration diagram for ODMatrix::descending_departure_comperator:
Collaboration graph

Public Member Functions

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

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 405 of file ODMatrix.h.

Constructor & Destructor Documentation

ODMatrix::descending_departure_comperator::descending_departure_comperator ( )
inline

constructor

Definition at line 408 of file ODMatrix.h.

Member Function Documentation

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 419 of file ODMatrix.h.

References ODMatrix::ODVehicle::depart, ODMatrix::ODVehicle::id, ODMatrix::ODMatrix(), and ODMatrix::operator=().


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