bool NBTrafficLightDefinition::needsCont(const NBEdge* fromE, const NBEdge* toE, const NBEdge* otherFromE, const NBEdge* otherToE) const { if (!myNeedsContRelationReady) { initNeedsContRelation(); assert(myNeedsContRelationReady); } return std::find(myNeedsContRelation.begin(), myNeedsContRelation.end(), StreamPair(fromE, toE, otherFromE, otherToE)) != myNeedsContRelation.end(); }
bool NBLoadedSUMOTLDef::rightOnRedConflict(int index, int foeIndex) const { if (amInvalid()) { return false; } if (!myRightOnRedConflictsReady) { initNeedsContRelation(); assert(myRightOnRedConflictsReady); } return std::find(myRightOnRedConflicts.begin(), myRightOnRedConflicts.end(), std::make_pair(index, foeIndex)) != myRightOnRedConflicts.end(); }