36#ifndef RANDOMFIELDUTILITYFUNCTIONS_HPP
37#define RANDOMFIELDUTILITYFUNCTIONS_HPP
41namespace random_field {
44 inline double ReshapeAux(
const double val)
46 double dist_from_half = 2.0 * (0.5 - std::abs(0.5 - std::abs(val)));
47 double strength = (1.0 - std::abs(val)) + dist_from_half * 0.2;
48 return val * (1.0 - 0.18 * strength);
52 inline double Reshape(
const double val) {
53 using namespace detail;
54 return ReshapeAux(ReshapeAux(val));