mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
#14075 Histogram: Compute percentiles and mean in a single call
This commit is contained in:
1 parent
2f8ec77851
commit
277d8a4da8
2 files changed
+12
-6
No files matched your search
+6
-3
@@ -173,9 +173,12 @@ RimHistogramDataSource::HistogramResult RimEnsembleParameterHistogramDataSource:
|
||||
|
||||
result.valuesY = computeHistogramFrequencies( histogram, graphType, frequencyType );
|
||||
|
||||
result.p10 = histCalc.calculatePercentil( 0.1, RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
result.mean = histCalc.calculatePercentil( 0.5, RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
result.p90 = histCalc.calculatePercentil( 0.9, RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
double p10, p50, p90, mean;
|
||||
RigStatisticsMath::calculateStatisticsCurves( values, &p10, &p50, &p90, &mean, RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
|
||||
result.p10 = p10;
|
||||
result.mean = mean;
|
||||
result.p90 = p90;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
+6
-3
@@ -249,9 +249,12 @@ RimHistogramDataSource::HistogramResult RimEnsembleSummaryVectorHistogramDataSou
|
||||
|
||||
result.valuesY = computeHistogramFrequencies( histogram, graphType, frequencyType );
|
||||
|
||||
result.p10 = histCalc.calculatePercentil( 0.1, RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
result.mean = histCalc.calculatePercentil( 0.5, RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
result.p90 = histCalc.calculatePercentil( 0.9, RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
double p10, p50, p90, mean;
|
||||
RigStatisticsMath::calculateStatisticsCurves( values, &p10, &p50, &p90, &mean, RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
|
||||
result.p10 = p10;
|
||||
result.mean = mean;
|
||||
result.p90 = p90;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user