function logVal = computeGtildeVector(lambda,k)
% logVal = computeGtildeVector(lambda,k)
%
% Returns a matrix whose rows are the \tilde{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=1:k;
logVec=log(vec);
catalanVec = computeLogModCatalan(vec)+logVec;
logVal = log(lambda)*(vec-1) + repmat(catalanVec,[length(lambda) 1]);
logVal = exp(logVal);
logVal = [zeros(length(lambda),1) logVal];