Skip to content

Commit

Permalink
[fixup] Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vickyliu-go4it committed Jun 21, 2021
1 parent 1c8df79 commit 74157f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/OrbitGl/MultivariateTimeSeries.h
Expand Up @@ -77,6 +77,13 @@ class MultivariateTimeSeries {
TimeSeriesEntryIter begin;
TimeSeriesEntryIter end;
};
// If there is no overlap between time range [min_time, max_time] and [StartTimeInNs(),
// EndTimeInNs()], return std::nullopt. Otherwise return a range of entries affected by the time
// range [min_time, max_time] where:
// * `Range::begin` points to the entry with the time key right before the time range (min_time,
// max_time) if exists; otherwise points to the fist entry.
// * `Range::end` points to the entry with the time key right after the time range (min_time,
// max_time) if exists; otherwise points to the last entry.
[[nodiscard]] std::optional<Range> GetEntriesAffectedByTimeRange(uint64_t min_time,
uint64_t max_time) const {
if (IsEmpty() || min_time >= max_time || min_time >= time_to_series_values_.rbegin()->first ||
Expand Down

0 comments on commit 74157f9

Please sign in to comment.