59 DistrictCont::const_iterator i =
myDistricts.find(
id);
91 return o->
addSink(destination, weight);
98 (*i).second->removeFromSinksAndSources(e);
NBDistrict * retrieve(const std::string &id) const
Returns the districts with the given id.
NBDistrictCont()
Constructor.
DistrictCont myDistricts
The instance of the dictionary.
bool addSink(const std::string &dist, NBEdge *const destination, double weight)
Adds a sink to the named district.
bool insert(NBDistrict *const district)
Adds a district to the dictionary.
bool addSource(const std::string &dist, NBEdge *const source, double weight)
Adds a source to the named district.
void removeFromSinksAndSources(NBEdge *const e)
Removes the given edge from the lists of sources and sinks in all stored districts.
int size() const
Returns the number of districts inside the container.
~NBDistrictCont()
Destructor.
A class representing a single district.
bool addSink(NBEdge *const sink, double weight)
Adds a sink.
bool addSource(NBEdge *const source, double weight)
Adds a source.
The representation of a single edge during network building.
const std::string & getID() const
Returns the id.