void MS_E2_ZS_CollectorOverLanes::init(MSLane *lane, SUMOReal detLength) throw() { myLength = detLength; if (startPosM==0) { startPosM = (SUMOReal) 0.1; } SUMOReal length = lane->getLength() - startPosM - (SUMOReal) 0.1; SUMOReal dlength = detLength; if (length>dlength) { length = dlength; } myLengths.push_back(length); myLaneCombinations.push_back(LaneVector()); myLaneCombinations[0].push_back(lane); myDetectorCombinations.push_back(DetectorVector()); MSE2Collector *c = buildCollector(0, 0, lane, startPosM, length); myDetectorCombinations[0].push_back(c); myAlreadyBuild[lane] = c; extendTo(detLength); }
inline void extendTo (const BoundingBox & b) { extendTo (b.minBb); extendTo (b.maxBb); }
inline ValueType &operator()(KeyType x) { if(Graph1d<ValueType, KeyType, Int>::N==0 || x<Graph1d<ValueType, KeyType, Int>::minX || x> Graph1d<ValueType, KeyType, Int>::maxX) extendTo(x); return Graph1d<ValueType, KeyType, Int>::y[Graph1d<ValueType, KeyType, Int>::idx(x)];}