% BHGRSS   Build a higher order symmetric generator representable  semiseparable matrix
%       
%       SS=BSS(U,V)
%       Given the matrix U and V of dimensions n x p, this routine will
%       construct a higher order symmetric semiseparable matrix SS of it of rank p.
%       The size of the matrix will be n x n.
%
%       Software of the MaSe - Group
%       mase-at-cs.kuleuven.ac.be
%       Revision Date: 07/04/2005


function A=BHGRSS(U,V)
  
 % initial tests
   if (isempty(U) | isempty(V))
     disp('one of the matrices is empty')
   elseif ( size(U)~=size(V) )
     disp('both matrices should be of the same size')
   else   
  
   % initialization
     [n,p]=size(U);
   
   % now just perform the multiplication, extract the lower
   % and upper part
   
   A=tril(U*V')+triu(V*U',1);
   
   
   end
   