% Input:
% S: function handle (support function)
% L: Matrix (containing rw-wise direction vectors)

% Output:
% x: boolean

% Description:
% Returns true if the evaluation of support function s is possible in all
% directions from L without obvious numerical problems (caused by the
% algorithm specified by the user)

function [x] = performeSPTest(S,L)

x = true;

for i=1:1:size(L,1)
    l = L(i,:)';
    [v,exitflag] = S(l);
    
    if exitflag <= 0
        x = false;
        break;
    end;
    
    if isnan(v)
        x = false;
        fprintf('  ERROR: No usable solution found !\n');
        break;
    end;
end;