srho.hpp
1 // Copyright © 2020 Thomas Nagler
2 //
3 // This file is part of the wdm library and licensed under the terms of
4 // the MIT license. For a copy, see the LICENSE file in the root directory
5 // or https://github.com/tnagler/wdm/blob/master/LICENSE.
6 
7 #pragma once
8 
9 #include "utils.hpp"
10 #include "ranks.hpp"
11 #include "prho.hpp"
12 
13 namespace wdm {
14 
15 namespace impl {
16 
20 inline double srho(std::vector<double> x,
21  std::vector<double> y,
22  std::vector<double> weights = std::vector<double>())
23 {
24  utils::check_sizes(x, y, weights);
25  x = rank(x, weights, "average");
26  y = rank(y, weights, "average");
27  return prho(x, y, weights);
28 }
29 
30 }
31 
32 }
Weighted dependence measures.
Definition: bbeta.hpp:11