Iterator for every intersection of a specific interval in a AirFrameMatrix. More...
#include <ChannelInfo.h>
Public Member Functions | |
BaseIntersectionIterator (C *airFrames, simtime_t from, simtime_t to) | |
Creates an iterator for the specified interval at the specified AirFrameMatrix. | |
AirFrame * | next () |
Increases the iterator to the next intersecting AirFrame and returns a pointer to this AirFrame. | |
Public Attributes | |
C * | intervals |
Pointer to the matrix holding the intervals. | |
simtime_t | from |
Point in time to start iterating over intersections. | |
simtime_t | to |
Point in time to end iterating over intersections. | |
ItMatrix | endIt |
Iterator over AirFrame end times. | |
ItList | startIt |
Iterator over AirFrame start times. | |
bool | alreadyNext |
True if the we are already pointing to the next entry. |
Iterator for every intersection of a specific interval in a AirFrameMatrix.
A time interval A_start to A_end intersects with another interval B_start to B_end iff the following two conditions are fulfilled:
1. A_end >= B_start. 2. A_start <= B_end and
Or the defined by the opposite: The two intervals do not intersect iff A_end < B_start or A_start > B_end.
To iterate over a two dimensional (end-time x start-time) container of AirFrames this class iterates over all AirFrame-lists whose end-time is bigger or equal than the interval start (intersect condition 1) and in each of these lists iterates over all entries but only stops at and returns entries which start-time is smaller or equal than the interval end (intersection condition 2).
In template form to work as const- and non-const iterator.
Definition at line 80 of file ChannelInfo.h.