7 void lin_map(Container<Number>&
points,
const Number& a,
const Number& b,
const Number& c,
const Number& d) {
8 const auto mid1 = (a + b) / 2;
9 const auto mid2 = (c + d) / 2;
10 const auto scale = (d - c) / (b - a);
11 for (
auto& point :
points) {
12 point = mid2 + scale * (point - mid1);
17 Container<Number>
lin_mapped(
const Container<Number>&
points,
const Number& a,
const Number& b,
const Number& c,
const Number& d) {
18 auto mapped_points =
points;
24 void stretch(Container<Number>&
points,
const Number& a,
const Number& b) {
38 Container<Number>
stretched(
const Container<Number>&
points,
const Number& a,
const Number& b) {
39 auto stretched_points =
points;
41 return stretched_points;
Container< Number > lin_mapped(const Container< Number > &points, const Number &a, const Number &b, const Number &c, const Number &d)
Definition points.h:17
Container< Number > stretched(const Container< Number > &points, const Number &a, const Number &b)
Definition points.h:38
void stretch(Container< Number > &points, const Number &a, const Number &b)
Definition points.h:24
void lin_map(Container< Number > &points, const Number &a, const Number &b, const Number &c, const Number &d)
Definition points.h:7
ALFI_DEFAULT_NUMBER DefaultNumber
Definition config.h:17
ALFI_DEFAULT_CONTAINER< Number > DefaultContainer
Definition config.h:20