if (MathUtil.equal(t, 0.0)) {
return a.scatter(x, v, adjoint, lambda, ru, rv, rj);
} else if (MathUtil.equal(t, 1.0)) {
return b.scatter(x, v, adjoint, lambda, ru, rv, rj);
} else {
SeedReference ref = new SeedReference(rj);
return RandomUtil.bernoulli(t, ref) ?
b.scatter(x, v, adjoint, lambda, ru, rv, ref.seed) :
a.scatter(x, v, adjoint, lambda, ru, rv, ref.seed);
}
}