newton.utils.boltzmann#
- newton.utils.boltzmann(a, b, alpha)[source]#
Compute the Boltzmann-weighted average of two values.
This function returns a smooth interpolation between a and b using a Boltzmann (softmax-like) weighting, controlled by the parameter alpha. As alpha increases, the result approaches max(a, b); as alpha decreases, the result approaches the mean of a and b.