clang-format: Set column width to 140

* Set column width to 140
* Use c++20
* Remove redundant virtual
This commit is contained in:
Magne Sjaastad
2023-02-26 10:48:40 +01:00
parent 2bf3a511fe
commit 42b901ec28
1535 changed files with 10456 additions and 19398 deletions

View File

@@ -123,8 +123,7 @@ void RigStatisticsMath::calculateStatisticsCurves( const std::vector<double>& va
for ( int i = P10; i <= P90; i++ )
{
// Check valid params
if ( ( percentiles[i] < 1.0 / ( (double)valueCount + 1 ) ) ||
( percentiles[i] > (double)valueCount / ( (double)valueCount + 1 ) ) )
if ( ( percentiles[i] < 1.0 / ( (double)valueCount + 1 ) ) || ( percentiles[i] > (double)valueCount / ( (double)valueCount + 1 ) ) )
continue;
double rank = percentiles[i] * ( valueCount + 1 ) - 1;
@@ -165,8 +164,8 @@ void RigStatisticsMath::calculateStatisticsCurves( const std::vector<double>& va
/// the inputValues does not contain any valid values
//--------------------------------------------------------------------------------------------------
std::vector<double> RigStatisticsMath::calculateNearestRankPercentiles( const std::vector<double>& inputValues,
const std::vector<double>& pValPositions,
std::vector<double> RigStatisticsMath::calculateNearestRankPercentiles( const std::vector<double>& inputValues,
const std::vector<double>& pValPositions,
RigStatisticsMath::PercentileStyle percentileStyle )
{
std::vector<double> sortedValues;
@@ -209,8 +208,8 @@ std::vector<double> RigStatisticsMath::calculateNearestRankPercentiles( const st
/// This method treats HUGE_VAL as "undefined" values, and ignores these. Will return HUGE_VAL if
/// the inputValues does not contain any valid values
//--------------------------------------------------------------------------------------------------
std::vector<double> RigStatisticsMath::calculateInterpolatedPercentiles( const std::vector<double>& inputValues,
const std::vector<double>& pValPositions,
std::vector<double> RigStatisticsMath::calculateInterpolatedPercentiles( const std::vector<double>& inputValues,
const std::vector<double>& pValPositions,
RigStatisticsMath::PercentileStyle percentileStyle )
{
std::vector<double> sortedValues;
@@ -246,8 +245,7 @@ std::vector<double> RigStatisticsMath::calculateInterpolatedPercentiles( const s
if ( upperValueIndex < sortedValues.size() )
{
pVal = ( 1.0 - upperValueWeight ) * sortedValues[lowerValueIndex] +
upperValueWeight * sortedValues[upperValueIndex];
pVal = ( 1.0 - upperValueWeight ) * sortedValues[lowerValueIndex] + upperValueWeight * sortedValues[upperValueIndex];
}
else
{

View File

@@ -33,13 +33,8 @@ public:
SWITCHED
};
static void calculateBasicStatistics( const std::vector<double>& values,
double* min,
double* max,
double* sum,
double* range,
double* mean,
double* dev );
static void
calculateBasicStatistics( const std::vector<double>& values, double* min, double* max, double* sum, double* range, double* mean, double* dev );
static void calculateStatisticsCurves( const std::vector<double>& values,
double* p10,