std::vector< NBEdge * > EdgeVector
container for (sorted) edges
A class representing a single district.
bool addSink(NBEdge *const sink, double weight)
Adds a sink.
const std::vector< double > & getSourceWeights() const
Returns the weights of the sources.
Position myPosition
The position of the district.
const std::vector< double > & getSinkWeights() const
Returns the weights of the sinks.
std::vector< double > WeightsCont
Definition of a vector of connection weights.
const PositionVector & getShape() const
Returns the shape.
void mirrorX()
mirror coordinates along the x-axis
NBDistrict(const std::string &id, const Position &pos)
Constructor with id, and position.
void replaceIncoming(const EdgeVector &which, NBEdge *const by)
Replaces incoming edges from the vector (sinks) by the given edge.
EdgeVector mySources
The sources (connection from district to network)
void addShape(const PositionVector &p)
Sets the shape of this district.
bool addSource(NBEdge *const source, double weight)
Adds a source.
EdgeVector mySinks
The sinks (connection from network to district)
void replaceOutgoing(const EdgeVector &which, NBEdge *const by)
Replaces outgoing edges from the vector (source) by the given edge.
void reshiftPosition(double xoff, double yoff)
Applies an offset to the district.
WeightsCont mySourceWeights
The weights of the sources.
void setCenter(const Position &pos)
Sets the center coordinates.
const std::vector< NBEdge * > & getSourceEdges() const
Returns the sources.
PositionVector myShape
The shape of the dsitrict.
WeightsCont mySinkWeights
The weights of the sinks.
NBDistrict & operator=(const NBDistrict &s)
const std::vector< NBEdge * > & getSinkEdges() const
Returns the sinks.
void removeFromSinksAndSources(NBEdge *const e)
Removes the given edge from the lists of sources and sinks.
NBDistrict(const NBDistrict &s)
const Position & getPosition() const
Returns the position of this district's center.
The representation of a single edge during network building.
Base class for objects which have an id.
Static storage of an output device and its base (abstract) implementation.
A point in 2D or 3D with translation and scaling methods.