% ML exhaustive search for multi-user Gauss-Markov cost
%
function [min_b, FIR] = get_GM_ML()

global Nusers;
global Nsyms;
global HUGE_VAL;

s = [-1; 1];
n = Nusers*Nsyms;
ns = prod(2*ones(1,n)); % 2**n

c = ones( 1, n);

min_cost = HUGE_VAL;

for i = 1:ns

  b = s(c);

  [cost, g] = get_GM_ML_cost( b);

  if( cost < min_cost)
    min_cost = cost;
    min_b = b;
    FIR = g;
  end

  c = FSM_inc( c, 2);

end

min_b = reshape(min_b,Nsyms,Nusers);
