38 #ifdef CHECK_MEMORY_LEAKS
40 #endif // CHECK_MEMORY_LEAKS
49 :
Distribution(id), myPoints(points), myProbabilitiesAreComputed(false),
50 myInterpolateDist(interpolating) {}
78 return myPoints[(int) index + 1].x();
88 for (i = 0; i <
myPoints.size() - 1; i++) {
92 SUMOReal amount = minval * width + (maxval - minval) * width / (
SUMOReal) 2.;
97 for (i = 0; i <
myPoints.size() - 1; i++) {
104 for (i = 0; i <
myPoints.size() - 1; i++) {
108 for (i = 0; i <
myPoints.size() - 1; i++) {
SUMOReal getAreaPerc(size_t index) const
SUMOReal getAreaEnd(size_t index) const
A point in 2D or 3D with translation and scaling methods.
virtual ~Distribution_Points()
Destructor.
SUMOReal getAreaBegin(size_t index) const
bool myProbabilitiesAreComputed
PositionVector myPoints
The list of points that describe the distribution.
Distribution_Points(const std::string &id, const PositionVector &points, bool interpolating=false)
Constructor.
SUMOReal getMax() const
Returns the maximum value of this distribution.
std::vector< SUMOReal > myProbabilities