Skip to content

Commit

Permalink
working prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Sep 22, 2023
1 parent b035445 commit eab4e33
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,21 @@ void RimEnsembleStatisticsCase::calculate( const std::vector<RimSummaryCase*>& s
}
else
{
// Compute statistics on binnedYValues
double p10, p50, p90, mean;
RigStatisticsMath::calculateStatisticsCurves( binnedYValues, &p10, &p50, &p90, &mean, RigStatisticsMath::PercentileStyle::SWITCHED );
m_p10Data.push_back( p10 );
m_p50Data.push_back( p50 );
m_p90Data.push_back( p90 );
m_meanData.push_back( mean );
const size_t minimumCount = 500;

if ( binnedYValues.size() > minimumCount )
{
double p10, p50, p90, mean;
RigStatisticsMath::calculateStatisticsCurves( binnedYValues, &p10, &p50, &p90, &mean, RigStatisticsMath::PercentileStyle::SWITCHED );
m_p10Data.push_back( p10 );
m_p50Data.push_back( p50 );
m_p90Data.push_back( p90 );
m_meanData.push_back( mean );

m_binnedXValues.emplace_back( currentX );
}

currentX += deltaRangeX;
m_binnedXValues.emplace_back( currentX );
binnedYValues.clear();
}
}
Expand Down

0 comments on commit eab4e33

Please sign in to comment.