function logVal = computeGvector(lambda,k)
% logVal = computeGvector(lambda,k)
%
% Returns a matrix whose rows are the G_i vectors
%
% lambda - The parameter (column) vector 
% k - The length of each G_i vector

%make sure lambda is a column vector
if size(lambda,2)>1, lambda=lambda';end

vec=0:k;
catalanVec = computeLogModCatalan(vec);
logVal = exp(log(lambda)*vec + repmat(catalanVec,[length(lambda) 1]));