paperCommon

Shared discrete random-variable transforms for the paper-faithful reference generators (generate_dri1_reference.py, generate_rs_reference.py, generate_w2ito_reference.py).

These mirror the C++ stochasticWeakRV::threePoint / twoPoint (see stochasticWeakRandomVariables.h) so a generator and the integrator it validates share a single definition of the transforms and the 1/6-quantile threshold. Both functions are elementwise and accept either a scalar or a NumPy array.

paperCommon.three_point(dW, h)[source]

Three-point transform: {-sqrt(3h), 0, +sqrt(3h)} with probs {1/6, 2/3, 1/6}, thresholding dW/sqrt(h) against the 1/6 quantile. Elementwise; scalar or array.

paperCommon.two_point(dZ, scale=1.0)[source]

Two-point transform: +scale if dZ > 0 else -scale (strictly-positive convention). Elementwise; scalar or array. Pass scale=sqrt(h) for the sqrt(h)-scaled variant.