mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 13:13:36 +00:00
rank corr
(cherry picked from commit2815397a19
) (cherry picked from commitd244797def
)
This commit is contained in:
parent
950094c233
commit
e32887d300
@ -3,7 +3,6 @@
|
|||||||
#include <AggregateFunctions/FactoryHelpers.h>
|
#include <AggregateFunctions/FactoryHelpers.h>
|
||||||
#include "registerAggregateFunctions.h"
|
#include "registerAggregateFunctions.h"
|
||||||
|
|
||||||
#include <AggregateFunctions/Helpers.h>
|
|
||||||
#include <DataTypes/DataTypeAggregateFunction.h>
|
#include <DataTypes/DataTypeAggregateFunction.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ public:
|
|||||||
//sort x_values
|
//sort x_values
|
||||||
std::sort(std::begin(tmp_values), std::end(tmp_values), ComparePairFirst<std::greater>{});
|
std::sort(std::begin(tmp_values), std::end(tmp_values), ComparePairFirst<std::greater>{});
|
||||||
|
|
||||||
for (size_t j = 0; j < size; )
|
for (size_t j = 0; j < size;)
|
||||||
{
|
{
|
||||||
//replace x_values with their ranks
|
//replace x_values with their ranks
|
||||||
size_t rank = j + 1;
|
size_t rank = j + 1;
|
||||||
@ -222,7 +222,7 @@ public:
|
|||||||
std::sort(std::begin(tmp_values), std::end(tmp_values), ComparePairSecond<std::greater>{});
|
std::sort(std::begin(tmp_values), std::end(tmp_values), ComparePairSecond<std::greater>{});
|
||||||
|
|
||||||
//replace y_values with their ranks
|
//replace y_values with their ranks
|
||||||
for (size_t j = 0; j < size; )
|
for (size_t j = 0; j < size;)
|
||||||
{
|
{
|
||||||
//replace x_values with their ranks
|
//replace x_values with their ranks
|
||||||
size_t rank = j + 1;
|
size_t rank = j + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user