21 #ifndef NBAlgorithms_h
22 #define NBAlgorithms_h
129 for (EdgeVector::const_iterator it = e.begin(); it != e.end(); ++it) {
131 result =
MIN2(result, rank);
152 const std::vector<NBEdge*>::iterator& i1,
153 const std::vector<NBEdge*>::iterator& i2);
171 angle = 360. + angle;
180 if (angle < 0.1 || angle > 359.9) {
int operator()(NBEdge *e1, NBEdge *e2) const
Sorts incoming and outgoing edges clockwise around the given node.
Sorts crossings by minimum clockwise clockwise edge angle. Use the ordering found in myAllEdges of th...
int operator()(const Combination &c1, const Combination &c2) const
The representation of a single edge during network building.
combination_by_angle_sorter()
SUMOReal getConvAngle(NBEdge *e) const
Converts the angle of the edge if it is an incoming edge.
static void swapWhenReversed(const NBNode *const n, bool leftHand, const std::vector< NBEdge * >::iterator &i1, const std::vector< NBEdge * >::iterator &i2)
Assures correct order for same-angle opposite-direction edges.
static void computeTurnDirectionsForNode(NBNode *node)
Computes turnaround destinations for all incoming edges of the given nodes (if any) ...
Stores the information about the angle between an incoming ("from") and an outgoing ("to") edge...
const std::string & getID() const
Returns the id.
crossing_by_junction_angle_sorter & operator=(const crossing_by_junction_angle_sorter &s)
invalidated assignment operator
static void computeEdgePriorities(NBNodeCont &nc)
Computes edge priorities within a node.
size_t getMinRank(const EdgeVector &e) const
retrieves the minimum index in myAllEdges
static void computeTurnDirections(NBNodeCont &nc)
Computes turnaround destinations for all edges (if exist)
int operator()(const NBNode::Crossing &c1, const NBNode::Crossing &c2) const
static bool samePriority(const NBEdge *const e1, const NBEdge *const e2)
Returns whether both edges have the same priority.
const EdgeVector & myOrdering
NBNode * myNode
The node to compute the relative angle of.
static void computeNodeTypes(NBNodeCont &nc)
Computes node types.
crossing_by_junction_angle_sorter(const EdgeVector &ordering)
std::vector< NBEdge * > EdgeVector
EdgeVector edges
The edges being crossed.
Represents a single node (junction) during network building.
static NBEdge * extractAndMarkFirst(NBNode &n, std::vector< NBEdge * > &s)
Sets the priorites in case of a priority junction.
A definition of a pedestrian crossing.
Sorts "Combination"s by decreasing angle.
static void setPriorityJunctionPriorities(NBNode &n)
Sets the priorites in case of a priority junction.
Container for nodes during the netbuilding process.
static void sortNodesEdges(NBNodeCont &nc, bool leftHand)
Sorts a node's edges clockwise regarding driving direction.
edge_by_junction_angle_sorter(NBNode *n)
A storage for available types of edges.
SUMOReal getAngleAtNode(const NBNode *const node) const
Returns the angle of the edge's geometry at the given node.
NBNode * getFromNode() const
Returns the origin node of the edge.