#include <cstdint>
#include "points.h"
Go to the source code of this file.
◆ MedianOfCircularValues()
Definition at line 113 of file linlsq.h.
113 {
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);
119 }
121 if (offset_needed) {
122 for (int i = 0; i < num_elements; ++i) {
123 (*v)[i] += halfrange;
124 }
125 }
127 if (offset_needed) {
128 for (int i = 0; i < num_elements; ++i) {
129 (*v)[i] -= halfrange;
130 }
131 }
132 return (*v)[median_index];
133}
int choose_nth_item(int target_index)
double y_variance() const
double x_variance() const
void add(double x, double y)