func IntMeanRange(mean, rnge int64, thr int) int64 {
	return mean + (IntZeroN(2*rnge+1, thr) - rnge)
}
IntMeanRange returns uniform random integer with given range on either side of the mean:
[mean - range, mean + range]
package erand
import (
	"math/rand"
	"github.com/goki/ki/kit"
	"gonum.org/v1/gonum/stat/distuv"
)
type RndParams struct {
	Dist RndDists `desc:"distribution to generate random numbers from"`
	Mean float64  `desc:"mean of random distribution -- typically added to generated random variants"`
	Var  float64  `desc:"variability parameter for the random numbers (gauss = standard deviation, not variance; uniform = half-range, others as noted in RndDists)"`
	Par  float64  `view:"if Dist=Gamma,Binomial,Beta" desc:"extra parameter for distribution (depends on each one)"`
}
func (rp *RndParams) Gen(thr int) float64 {
	switch rp.Dist {
	case Uniform:
		return UniformMeanRange(rp.Mean, rp.Var, thr)
	case Binomial:
		return rp.Mean + Binom(rp.Par, rp.Var, thr)
	case Poisson:
		return rp.Mean + Poiss(rp.Var, thr)
	case Gamma:
		return rp.Mean + Gam(rp.Var, rp.Par, thr)
	case Gaussian:
		return rp.Mean + Gauss(rp.Var, thr)
	case Beta:
		return rp.Mean + Bet(rp.Var, rp.Par, thr)
	}
	return rp.Mean
}
func (rp *RndParams) Density(s float64) float64 {
	return 0
}
type RndDists int
var KiT_RndDists = kit.Enums.AddEnum(RndDistsN, kit.NotBitFlag, nil)
func (ev RndDists) MarshalJSON() ([]byte, error)  { return kit.EnumMarshalJSON(ev) }
func (ev *RndDists) UnmarshalJSON(b []byte) error { return kit.EnumUnmarshalJSON(ev, b) }
const (
	Uniform RndDists = iota
	Binomial
	Poisson
	Gamma
	Gaussian
	Beta
	Mean
	RndDistsN
)
func IntZeroN(n int64, thr int) int64 {
	return rand.Int63n(n)
}
func IntMinMax(min, max int64, thr int) int64 {
	return min + IntZeroN(max-min, thr)
}