% check Gaussian ML cost for a local minimum or stationary point
%
% assumes that the symbols are -1 and +1
%
function r = check_Gauss_ML_min( b)

global N;

global g_c1;
global g_c2;
global g_b;

r = 1;

c1 = get_Gauss_ML_cost( b);

g_c1 = c1;
% g_c1
  
for k = 1:N
  b(k) = -b(k);
  c2 = get_Gauss_ML_cost( b);

g_c2 = c2;
g_b = b;
% g_c2

  b(k) = -b(k);
% if( c2 <= c1)
  if( c2 <  c1)
    r = 0;
    break;
  end
end
