Skip to content

Feature/TwoStepComputable-timeseries#268

Open
danhamill wants to merge 1 commit intomasterfrom
Feature/TwoStepComputable-timeseries
Open

Feature/TwoStepComputable-timeseries#268
danhamill wants to merge 1 commit intomasterfrom
Feature/TwoStepComputable-timeseries

Conversation

@danhamill
Copy link
Contributor

relates to #257

This PR is conceptually similar to getClosestVolEnsembleMember from the rts-forecast-processor-plugin but is implemented here to work within the SQLite database format.

Two classes were added to support returning the ensemble member hydrograph representing a two step statistical metric.

  • New ComputableIndex Class
  • PercentileComputableIndex - This Class contains a helper class ValueIndexPair to support tracking the original unsorted n-day volume index after they get sorted to calculate a percentile.

To implement these classes I refactored SingleComputable to SingleValueComputable to allow for a new class SingleTimeSeriesComputable which differentiates between float and float[] return datatypes.

The calculation is actually completed in TwoStepComputableSingleMetricTimeSeries which was based upon TwoStepComputableSingleMetricValue (formerly named TwoStepComputable).

A new method computeSingleValueSummaryTimeSeries was implemented in EnsembleTimeSeries.java

The unit test testMetricCollectionAsTimeSeries_TwoStep() was added to MetricCollectionTimeSeriesUnitsTest.java

…tations; introduce SingleValueComputable and SingleTimeSeriesComputable interfaces, and update related classes and tests accordingly.

- Implement new ComputableIndex class
- PercentileComputableIndex - This Class contains a helper class ValueIndexPair to support tracking the original unsorted n-day volume index after they get sorted to calculate a percentile.
- refactor SingleComputable to SingleValueComputable to allow for a new class SingleTimeSeriesComputable which differentiates between float and float[] return datatypes.
- Implement TwoStepComputableSingleMetricTimeSeries which was based upon TwoStepComputableSingleMetricValue
- Implement new method computeSingleValueSummaryTimeSeries was implemented in EnsembleTimeSeries.java
- Add unit test testMetricCollectionAsTimeSeries_TwoStep() was added to  MetricCollectionTimeSeriesUnitsTest.java
@danhamill danhamill requested a review from dvdhoz February 13, 2026 23:18
@danhamill danhamill changed the title Refactor computable interfaces and implementations for two-step compu… Feature/TwoStepComputable-timeseries Feb 13, 2026
@dvdhoz dvdhoz requested a review from sevans40 March 5, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant