function bnode = randomize_params_gaussian(bnode)
% RANDOMIZE_PARAMS_GAUSSIAN Set the parameters of a Gaussian node to random values.
% bnode = randomize_params_gaussian(bnode)
%
% Use randn('state', seed) before calling to control the random param. values.

adjustable = bnode.adjustable_mean | bnode.adjustable_cov | bnode.adjustable_weights;
if ~adjustable, return; end

ss = bnode.self_size;

if bnode.adjustable_mean,    bnode.mean = myrandn([ss bnode.dpsizes]); end
if bnode.adjustable_weights, bnode.weights = randn([ss bnode.cpsize bnode.dpsizes]); end
if bnode.adjustable_cov
  % We set cov to I regardless of bnode.cov_type
  scale = 100; % high initial uncertainty encourages learning (U. Sondhauss 6/27/99)
  bnode.cov = scale*repmat(eye(ss), [1 1 bnode.dpsizes]);
  % Store the initial covariances in case we need to reset
  bnode.init_cov = bnode.cov;
end

