function vtable = BR_create_vtable(n)
% BR_create_vtable - create a variable table for general KBs
% On input:
%     n (int): number of variables
% On output:
%     vtable (nx7 array): variable characterization
%      col 1: literal 1
%      col 2: literal 2
%      col 3: literal 3
%      col 4: clause number giving rise to variable
%      col 5: parity of clause
%         for 2-literal clause: 0, 1, 2, 3
%         for 3-literal clause: 0, 2, 3, 7
%      col 6: variable number in equations
%      col 7: operator for 3-literal clause
%        1: P(A|B^C), i.e., 'and'; 2: P(A|BvC), i.e., 'or'
% Call:
%     vtable = BR_create_vtable(6);
% Author:
%     T. Henderson
%     UU
%     Summer 2018
%

vtable = zeros(n,7);
vtable(:,1) = [1:n]';
vtable(:,6) = [1:n]';
vtable(:,5) = ones(n,1);
