The multivariate generalization of truncation formula |x|_p <= b is
done as: (sum((x/b)^p))^(1/p) <= 1 to allow for non-scalar b.
However, for intuitive setups like b=9, p=1, x=[5,1,1,1,1] will
evaluate as False because of rounding errors.
To fix this, we add a nudge factor to the bound:
(sum((x/b)^p))^(1/p) <= 1+nudge
Small enough that the user will never notice, but big enough to catch
all rounding errors.
As this problem is likely to scale with the dimensionality, the nudge
factor should scale the same way.
The multivariate generalization of truncation formula
|x|_p <= b
is done as:(sum((x/b)^p))^(1/p) <= 1
to allow for non-scalarb
. However, for intuitive setups likeb=9, p=1, x=[5,1,1,1,1]
will evaluate as False because of rounding errors.To fix this, we add a nudge factor to the bound:
(sum((x/b)^p))^(1/p) <= 1+nudge
Small enough that the user will never notice, but big enough to catch all rounding errors. As this problem is likely to scale with the dimensionality, the nudge factor should scale the same way.Solves #80.