generate-shapes/src/pfaedle/eval/Result.h
Patrick Brosi 63f0b61ea1 clean up and refactor half-baked development commits and squash them into a new version.
Changes:

* support for multiple GTFS feeds as input in filtering, read default global and local configuration files
* be a bit more memory conservative
* make caching optional
* dont delete orphan edge if it would transform a degree 3 node with a possible full turn into a degree 2 node eligible for contraction
* dedicated filters for funicular and gondola
* make max snap level option more intuitive
* allow filter rules for level 0
* additional fallback for station snapping
* dont try to route for MOT unequal to trip in -T mode, force-snap to orphaned OSM station if not snap was possible
* write bounds to filtered osm
* remove unused surrounding heuristic
* use bus lanes info
* be a bit more tolerant for bus oneway streets
* create missing directories
* error if no cfg is present, clean up evaluation Makefile
2019-01-12 01:08:13 +01:00

41 lines
900 B
C++

// Copyright 2018, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Authors: Patrick Brosi <brosi@informatik.uni-freiburg.de>
#ifndef PFAEDLE_EVAL_RESULT_H_
#define PFAEDLE_EVAL_RESULT_H_
#include "pfaedle/gtfs/Feed.h"
#include "ad/cppgtfs/gtfs/Feed.h"
using pfaedle::gtfs::Trip;
using ad::cppgtfs::gtfs::Shape;
namespace pfaedle {
namespace eval {
/*
* A single evaluation result.
*/
class Result {
public:
Result(const Trip* t, double dist) : _t(t), _dist(dist) {}
double getDist() const { return _dist; }
const Trip* getTrip() const { return _t; }
private:
const Trip* _t;
double _dist;
};
inline bool operator<(const Result& lhs, const Result& rhs) {
return lhs.getDist() < rhs.getDist() ||
(lhs.getDist() == rhs.getDist() && lhs.getTrip() < rhs.getTrip());
}
} // namespace eval
} // namespace pfaedle
#endif // PFAEDLE_EVAL_RESULT_H_