70 int _numPixelH,
int _headerSize)
90 Time endTime = timeStart + timeRange;
156 int endPixel,
int minIndex,
double pixelLength,
Time startingTime)
158 int midPixel = (startPixel + endPixel) / 2;
159 if (midPixel == startPixel)
166 int addedLeft =
sampleTimeLine(minLoc, loc, startPixel, midPixel, minIndex,
167 pixelLength, startingTime);
169 minIndex + addedLeft + 1, pixelLength, startingTime);
171 return (addedLeft + addedRight + 1);
185 if (l_boundOffset == r_boundOffset)
186 return l_boundOffset;
197 while (r_index - l_index > 1)
205 double invrate = (r_index - l_index) / (r_time - l_time);
206 Time mtime = (r_time - l_time) / 2;
209 predicted_index = max((
Long) ((time - l_time) * invrate) + l_index, l_index);
213 predicted_index = min((r_index - (
long) ((r_time - time) * invrate)), r_index);
218 if (predicted_index <= l_index)
219 predicted_index = l_index + 1;
220 if (predicted_index >= r_index)
221 predicted_index = r_index - 1;
226 l_index = predicted_index;
231 r_index = predicted_index;
241 int leftDiff = time - l_time;
242 int rightDiff = r_time - time;
243 bool is_left_closer = abs(leftDiff) < abs(rightDiff);
246 else if (r_offset <
maxloc)
268 vector<TimeCPID>::iterator it =
listCPID->begin();
295 for (
int i = 0; i < len - 2; i++)
298 while (i < len - 1 && (*
listCPID)[i].timestamp == (*
listCPID)[i + 1].timestamp)
300 vector<TimeCPID>::iterator it =
listCPID->begin();
virtual ~TraceDataByRank()
int64_t getLong(FileOffset position)
FileOffset getRelativeLocation(FileOffset)
FileOffset getAbsoluteLocation(FileOffset)
void addSample(unsigned int, TimeCPID)
void getData(Time timeStart, Time timeRange, double pixelLength)
FileOffset getMaxLoc(int pseudoRank)
#define SIZE_OF_TRACE_RECORD
int sampleTimeLine(FileOffset minLoc, FileOffset maxLoc, int startPixel, int endPixel, int minIndex, double pixelLength, Time startingTime)
int getInt(FileOffset position)
Long getNumberOfRecords(FileOffset, FileOffset)
vector< TimeCPID > * listCPID
FileOffset getMinLoc(int pseudoRank)
FileOffset findTimeInInterval(Time time, FileOffset l_boundOffset, FileOffset r_boundOffset)
TraceDataByRank(FilteredBaseData *, int, int, int)