20 #ifndef NBAlgorithms_h
21 #define NBAlgorithms_h
121 const std::vector<NBEdge*>::iterator& i1,
122 const std::vector<NBEdge*>::iterator& i2);
140 angle = 360. + angle;
149 if (angle < 0.1 || angle > 359.9) {
int operator()(NBEdge *e1, NBEdge *e2) const
Sorts incoming and outgoing edges clockwise around the given node.
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.
static void computeEdgePriorities(NBNodeCont &nc)
Computes edge priorities within a node.
static void computeTurnDirections(NBNodeCont &nc)
Computes turnaround destinations for all edges (if exist)
static bool samePriority(const NBEdge *const e1, const NBEdge *const e2)
Returns whether both edges have the same priority.
NBNode * myNode
The node to compute the relative angle of.
static void computeNodeTypes(NBNodeCont &nc)
Computes node types.
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.
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.