summaryrefslogtreecommitdiffstats
path: root/library/cpp/histogram/adaptive/common.h
blob: 31a5f2d2f80fa647ec213cc1979fbb3a57f5f321 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once 
 
#include <utility>
 
namespace NKiwiAggr { 
    using TWeightedValue = std::pair<double, double>; // value, weight
    using TQualityFunction = TWeightedValue (*)(const TWeightedValue&, const TWeightedValue&); 
 
    TWeightedValue CalcDistanceQuality(const TWeightedValue& left, const TWeightedValue& right); 
    TWeightedValue CalcWeightQuality(const TWeightedValue& left, const TWeightedValue& right); 
    TWeightedValue CalcWardQuality(const TWeightedValue& left, const TWeightedValue& right); 
}