I have two problems, first of all, the code below exits randomly due to a memory or unpublished location error. I can not just do it, see it. Second, I'm not sure the algorithm is correct. (Algorithms appear to emulate photonics use for anyone)
Vectors are linearly composed of ticketing time, where stop signal is delayed up to 180 seconds, if i_th The start signal is low compared to the I_th stop signal, the timer starts, the timer meets the stop signal, and ignores all start signals when the timer is closed, unless start-up registrations Sector should ignore all the stops. The code should have time difference between these start / stop.
- If there is a name like this type, please post it below.
The code below takes the formulas of these filling and tries to emulate this process. But before I correct the algorithm, what do I mistaken with memory issues.
This is the code that does not work all the time, the starting / stop vector works for a small number of more than 10,000, but I need it to repeat up to 100,000 pairs.
while (start.size ()> 5 & amp; amp; stop. size ()> 5) {if (start.at (0)> = stop .at (0)) {thisStart = start.at (0); } J = 0; While (stop.eat (j) & lt; = start.at (0)) {j ++; } Stop.ridge (stop.bizin (), stop.bizin () + j + 1); ThisStop = stops.at (0); J = 0; While (start.at (j) & lt; = thisStop) {j ++; } Starts. Start (begin.begin), start.begin () + j + 1); Bucket sort (this site - it's start, bins, and calculations); }
while (stops.at (j) & lt; = start At (0)) {j ++; } This loop will be out of range if it does not get an element in stop which is less than or equal to [0] < / / Code>. An exception will be thrown out of a out_of_range , that is to be done by at () . I do not know that this is your problem because you did not exactly tell what kind of error is happening, but of course it is something to see. Would you like to have a condition like this:
while (j & lt; stops.size () & amp; prevents [j] & lt; = Start [0]) {...}
Comments
Post a Comment