42 #ifdef CHECK_MEMORY_LEAKS
44 #endif // CHECK_MEMORY_LEAKS
std::string getRandomSource() const
Returns the id of a source to use.
int sinkNumber() const
Returns the number of sinks.
bool add(SUMOReal prob, T val, bool checkDuplicates=true)
Adds a value with an assigned probability to the distribution.
ODDistrict(const std::string &id)
Constructor.
void addSink(const std::string &id, SUMOReal weight)
Adds a sink connection.
const std::vector< T > & getVals() const
Returns the members of the distribution.
RandomDistributor< std::string > mySinks
Container of weighted sinks.
void addSource(const std::string &id, SUMOReal weight)
Adds a source connection.
RandomDistributor< std::string > mySources
Container of weighted sources.
std::string getRandomSink() const
Returns the id of a sink to use.
T get(MTRand *which=0) const
Draw a sample of the distribution.
Base class for objects which have an id.
int sourceNumber() const
Returns the number of sources.