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