function bnode = randomize_params_noisyfn(bnode)
% RANDOMIZE_PARAMS_NOISYFN Set the adjustable failure probabilites uniformly on [0,1].
% bnode = randomize_params_noisyfn(bnode)

np = length(bnode.parents);
mask = logical(bnode.adjustable_mask);
if bnode.symmetric
  pfail = rand(np, 1);
  bnode.pfail(mask) = pfail(mask);
  bnode.pfail = bnode.pfail(:);
else
  pfail = rand(np, bnode.parent_size);
  bnode.pfail(mask) = pfail(mask);
  bnode.pfail = reshape(bnode.pfail, np, bnode.parent_size);
end
