42 if (from == edges.end()) {
50 if (from == edges.begin()) {
51 from = edges.end() - 1;
60 for (std::vector<bool>::const_iterator i = v.begin(); i != v.end(); i++) {
70 for (EdgeVector::const_iterator i = edges.begin(); i != edges.end(); i++) {
71 if ((*i)->getToNode() == to && (*i)->getFromNode() == from) {
82 assert(ev.size() > 0);
83 double max = (*(ev.begin()))->getSpeed();
84 for (EdgeVector::const_iterator i = ev.begin() + 1; i != ev.end(); i++) {
86 max > (*i)->getSpeed()
87 ? max : (*i)->getSpeed();
104 return std::find(incoming.begin(), incoming.end(),
myEdge) != incoming.end();
119 return std::find(outgoing.begin(), outgoing.end(),
myEdge) != outgoing.end();
127 : myDestinationNode(dest) {}
141 if (e1 ==
nullptr || e2 ==
nullptr) {
150 while (fabs(relAngle1 - relAngle2) < 3.0) {
163 return relAngle1 > relAngle2;
172 if (e1 ==
nullptr || e2 ==
nullptr) {
181 while (fabs(relAngle1 - relAngle2) < 3.0) {
194 return relAngle1 > relAngle2;
200 for (EdgeVector::const_iterator i = ev.begin(); i != ev.end(); i++) {
201 if (i != ev.begin()) {
212 if (edges.size() == 0) {
215 double ret = (*(edges.begin()))->getSpeed();
216 for (EdgeVector::const_iterator i = edges.begin() + 1; i != edges.end(); i++) {
217 if ((*i)->getSpeed() > ret) {
218 ret = (*i)->getSpeed();
227 if (edges.size() == 0) {
230 double ret = (*(edges.begin()))->getSpeed();
231 for (EdgeVector::const_iterator i = edges.begin() + 1; i != edges.end(); i++) {
232 if ((*i)->getSpeed() < ret) {
233 ret = (*i)->getSpeed();
246 const double absDiff = fabs(angle1 - angle2);
249 if (absDiff < 2 || absDiff > (360 - 2)) {
257 if (e1Peds && !e2Peds) {
259 }
else if (!e1Peds && e2Peds) {
263 if (!e1Peds && e2Peds) {
265 }
else if (e1Peds && !e2Peds) {
276 return angle1 < angle2;
bool operator()(const NBNode *const n) const
double getLength() const
Returns the computed length of the edge.
double getAngleAtNodeToCenter(const NBNode *const node) const
Returns the angle of from the node shape center to where the edge meets the node shape.
node_with_outgoing_finder(const NBEdge *const e)
constructor
static double maxSpeed(const EdgeVector &ev)
static double getMinSpeed(const EdgeVector &edges)
static double normRelAngle(double angle1, double angle2)
ensure that reverse relAngles (>=179.999) always count as turnarounds (-180)
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
static const double ANGLE_LOOKAHEAD
the distance at which to take the default angle
const NBEdge *const myEdge
friend std::ostream & operator<<(std::ostream &os, const EdgeVector &ev)
The representation of a single edge during network building.
int operator()(const NBEdge *e1, const NBEdge *e2) const
comparing operation
double angleTo2D(const Position &other) const
returns the angle in the plane of the vector pointing from here to the other position ...
static void nextCW(const EdgeVector &edges, EdgeVector::const_iterator &from)
static double legacyDegree(const double angle, const bool positive=false)
NBNode * myDestinationNode
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges (The edges which start at this node)
static std::ostream & out(std::ostream &os, const std::vector< bool > &v)
A point in 2D or 3D with translation and scaling methods.
bool operator()(const NBNode *const n) const
const std::string & getID() const
int operator()(NBEdge *e1, NBEdge *e2) const
comparing operation
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
edge_with_destination_finder(NBNode *dest)
constructor
const PositionVector & getGeometry() const
Returns the geometry of the edge.
int operator()(NBEdge *e1, NBEdge *e2) const
comparing operation
double length() const
Returns the length.
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges (The edges which yield in this node)
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
const NBEdge *const myEdge
double getStartAngle() const
Returns the angle at the start of the edge (relative to the node shape center) The angle is computed ...
node_with_incoming_finder(const NBEdge *const e)
constructor
const Position & getPosition() const
bool operator()(NBEdge *e) const
Represents a single node (junction) during network building.
static double getMaxSpeed(const EdgeVector &edges)
NBNode * getFromNode() const
Returns the origin node of the edge.
NBNode * getToNode() const
Returns the destination node of the edge.
static void nextCCW(const EdgeVector &edges, EdgeVector::const_iterator &from)
double getEndAngle() const
Returns the angle at the end of the edge (relative to the node shape center) The angle is computed in...
static NBEdge * findConnectingEdge(const EdgeVector &edges, NBNode *from, NBNode *to)