-
-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance Data Retrieval Accuracy with MatchType in TimeseriesRef #969
base: main
Are you sure you want to change the base?
Conversation
look at CI... |
- Added an enumeration MatchType with options Exact and Nearest. - Modified atTime and getRawIndexAtTime in TimeseriesRef to support MatchType, allowing callers to specify whether they need an exact timestamp match or the nearest available match. - Adjusted the atTime method to throw an error when an exact match is required but not found, enhancing error handling for strict match requirements.
I have resolved the compilation issues. However, I have a question regarding the proposal to pass an enum class |
if (match_type == MatchType::Exact) | ||
{ | ||
auto it = std::find_if(_plot_data->begin(), _plot_data->end(), | ||
[t](const auto& point) { return point.x == t; }); |
Check notice
Code scanning / CodeQL
Equality test on floating-point values Note
This MR introduces the
MatchType
enumeration toTimeseriesRef
, providing the option to choose between exact and nearest time matching. Changes include updates to theatTime
andgetRawIndexAtTime
methods to support this new functionality.For a detailed problem description see: #968