Make P10/P90 calculation style more explicit

This commit is contained in:
Kristian Bendiksen
2021-09-16 10:38:27 +02:00
committed by GitHub
parent 0bfa6ae2d1
commit 1e83254e9e
24 changed files with 149 additions and 116 deletions

View File

@@ -20,39 +20,8 @@
#include "RiaStatisticsTools.h"
#include "RifEclipseSummaryAddress.h"
#include "RigStatisticsMath.h"
#include "cafAssert.h"
#include <QString>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const QString RiaStatisticsTools::replacePercentileByPValueText( const QString& percentile )
{
QString result = percentile;
if ( result == ENSEMBLE_STAT_P10_QUANTITY_NAME )
{
result = ENSEMBLE_STAT_P90_QUANTITY_NAME;
}
else if ( result == ENSEMBLE_STAT_P90_QUANTITY_NAME )
{
result = ENSEMBLE_STAT_P10_QUANTITY_NAME;
}
else if ( percentile.contains( QString( "%1:" ).arg( ENSEMBLE_STAT_P10_QUANTITY_NAME ) ) )
{
result.replace( ENSEMBLE_STAT_P10_QUANTITY_NAME, ENSEMBLE_STAT_P90_QUANTITY_NAME );
}
else if ( percentile.contains( QString( "%1:" ).arg( ENSEMBLE_STAT_P90_QUANTITY_NAME ) ) )
{
result.replace( ENSEMBLE_STAT_P90_QUANTITY_NAME, ENSEMBLE_STAT_P10_QUANTITY_NAME );
}
return result;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -24,8 +24,6 @@
#include <numeric>
#include <vector>
class QString;
//==================================================================================================
//
//
@@ -34,8 +32,6 @@ class QString;
class RiaStatisticsTools
{
public:
static const QString replacePercentileByPValueText( const QString& percentile );
template <class NumberType>
static bool isInvalidNumber( NumberType value )
{