ODMatrix::descending_departure_comperator Class Reference

#include <ODMatrix.h>


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


Public Member Functions

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

Constructor & Destructor Documentation

ODMatrix::descending_departure_comperator::descending_departure_comperator (  )  [inline]

constructor

Definition at line 302 of file ODMatrix.h.

00302 { }


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] p1 First vehicle to compare
[in] p2 Second vehicle to compare
Returns:
Whether the departure time of the first vehicle is larger than the one of the second

Definition at line 313 of file ODMatrix.h.

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

00313                                                                         {
00314             if (p1.depart==p2.depart) {
00315                 return p1.id>p2.id;
00316             }
00317             return p1.depart>p2.depart;
00318         }


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

Generated on Wed May 5 00:06:57 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6