#include <cstdint>
#include "points.h"
Go to the source code of this file.
◆ MedianOfCircularValues()
Definition at line 113 of file linlsq.h.
115 T halfrange =
static_cast<T
>(modulus / 2);
116 int num_elements = v->
size();
117 for (
int i = 0; i < num_elements; ++i) {
118 stats.
add((*v)[i], (*v)[i] + halfrange);
122 for (
int i = 0; i < num_elements; ++i) {
123 (*v)[i] += halfrange;
128 for (
int i = 0; i < num_elements; ++i) {
129 (*v)[i] -= halfrange;
132 return (*v)[median_index];
void add(double x, double y)
int choose_nth_item(int target_index)
double y_variance() const
double x_variance() const