SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00008 // The description of a distribution by a curve 00009 /****************************************************************************/ 00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00012 /****************************************************************************/ 00013 // 00014 // This file is part of SUMO. 00015 // SUMO is free software: you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation, either version 3 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 #ifndef Distribution_Points_h 00022 #define Distribution_Points_h 00023 00024 00025 // =========================================================================== 00026 // included modules 00027 // =========================================================================== 00028 #ifdef _MSC_VER 00029 #include <windows_config.h> 00030 #else 00031 #include <config.h> 00032 #endif 00033 00034 #include "Distribution.h" 00035 #include <utils/geom/PositionVector.h> 00036 00037 00038 // =========================================================================== 00039 // class definitions 00040 // =========================================================================== 00047 class Distribution_Points : 00048 public Distribution { 00049 public: 00051 Distribution_Points(const std::string& id, 00052 const PositionVector& points, bool interpolating = false) ; 00053 00055 virtual ~Distribution_Points() ; 00056 00058 SUMOReal getMax() const; 00059 00060 size_t getAreaNo() const; 00061 SUMOReal getAreaBegin(size_t index) const; 00062 SUMOReal getAreaEnd(size_t index) const; 00063 SUMOReal getAreaPerc(size_t index) const; 00064 00065 00066 protected: 00068 PositionVector myPoints; 00069 00070 mutable bool myProbabilitiesAreComputed; 00071 00072 mutable std::vector<SUMOReal> myProbabilities; 00073 00074 bool myInterpolateDist; 00075 00076 }; 00077 00078 00079 #endif 00080 00081 /****************************************************************************/ 00082