function v = AI_all_values(examples)
%
% AI_all_values - return all values 
% Call:
%     v = AI_all_values([0 1 1; 1 1 1; 0 1 0]);
% On input:
%     examples (mxn array): training set
% On output:
%     v (vector): all class values
% Custom functions used:
%     none
% Author:
%     T. Henderson
%     UU
%     Fall 2012
%      

v = [];
if isempty(examples)
    return
end
[num_examples,num_cols] = size(examples);
indexes = find(examples(:,num_cols-1)==1);
v = [examples(1,num_cols)];
if isempty(indexes)
    return
end
ex_available = examples(indexes,:);
[num_ex_available,num_cols] = size(ex_available);
v = [ex_available(1,num_cols)];
% added line next
v = mode(ex_available(:,num_cols));
v = max(ex_available(:,num_cols));
return
for e = 2:num_ex_available
    if isempty(find(v==ex_available(e,num_cols)))
        v = [v,ex_available(e,num_cols)];
    end
end
