function[ W ] = Generate_wts(n,k)

global wt_vec W

% W = Generate_wts(n,k)
%
% Generates all possible weights for NBI subproblems given:
% n, the number of objectives
% 1/k, the uniform spacing between two w_i (k integral) 
% This is essentially all the possible integral partitions 
% of integer k into n parts.
%
% Courtesy: Sanjeeb Dash, Oct 1996.

% Function called : wtgener_test(n,k)

% Having allocated the global spaces for W (and an intermediate wt_vec)
% this calls wtgener_test to actually allocate the weights

W = [];

wt_vec = zeros(1,n);

wtgener_test(n,k);

% W = W/k;