% this function calculates a unique number for some given population
% number (needed for addressing)
function [ num ] = k2num( k, R, maxK )
  num = sum( (maxK+1).^(0:R-1) * k' );
end

