disp('Running MATLAB script file VecDistT.m') ;
%
%    FOR DEVELOPMENT AND TESTING OF MATLAB FUNCTION VecDist,
%           VECtor DISTances, L_p version


itest = 9 ;    %  0 (to do all), 1,...,9




if itest == 1 | itest == 0 ;

  disp('   ') ;
  disp('   ') ;
  disp('Test 1 of VecDist') ;


  vec1 = rand(3,1) 

  dist = VecDist(vec1) 
  dist1 = VecDist(vec1,1) 
  dist2 = VecDist(vec1,2) 
  distinf = VecDist(vec1,inf) 


  if itest == 0 ;
    gppause ;
  end;


elseif itest == 2 | itest == 0 ;

  disp('   ') ;
  disp('   ') ;
  disp('Test 2 of VecDist') ;


  vec1 = rand(3,2) 

  dist = VecDist(vec1) 
  dist1 = VecDist(vec1,1) 
  dist2 = VecDist(vec1,2) 
  distinf = VecDist(vec1,inf) 

  dif = vec1(:,1) - vec1(:,2)

  if itest == 0 ;
    gppause ;
  end;


elseif itest == 3 | itest == 0 ;

  disp('   ') ;
  disp('   ') ;
  disp('Test 3 of VecDist') ;


  vec1 = rand(5,2) 
  vec2 = rand(5,2) 

  dist = VecDist(vec1,vec2) 
  dist1 = VecDist(vec1,vec2,1) 
  dist2 = VecDist(vec1,vec2,2) 
  distinf = VecDist(vec1,vec2,inf) 

  diff = vec1 - vec2

  if itest == 0 ;
    gppause ;
  end;


elseif itest == 4 | itest == 0 ;

  disp('   ') ;
  disp('   ') ;
  disp('Test 4 of VecDist') ;


  vec1 = rand(3,3) 
  vec2 = rand(3,2) 

  dist = VecDist(vec1,vec2) 

  if itest == 0 ;
    gppause ;
  end;


elseif itest == 5 | itest == 0 ;

  disp('   ') ;
  disp('   ') ;
  disp('Test 5 of VecDist') ;


  vec1 = rand(3,2) 
  vec2 = rand(4,2) 

  dist = VecDist(vec1,vec2) 

  if itest == 0 ;
    gppause ;
  end;

elseif itest == 6 | itest == 0 ;

  disp('   ') ;
  disp('   ') ;
  disp('Test 6 of VecDist') ;


  vec1 = rand(3,1) 
  vec2 = rand(3,2) 

  dist = VecDist(vec1,vec2,inf) 

  diff1 = vec1 - vec2(:,1) 

  if itest == 0 ;
    gppause ;
  end;


elseif itest == 7 | itest == 0 ;

  disp('   ') ;
  disp('   ') ;
  disp('Test 7 of VecDist') ;


  vec1 = rand(1,3) 
  vec2 = rand(1,3) 

  dist = VecDist(vec1,vec2) 
  dist1 = VecDist(vec1,vec2,1) 
  dist2 = VecDist(vec1,vec2,2) 
  distinf = VecDist(vec1,vec2,inf) 

  diff1 = vec1 - vec2 

  if itest == 0 ;
    gppause ;
  end;


elseif itest == 8 | itest == 0 ;

  disp('   ') ;
  disp('   ') ;
  disp('Test 8 of VecDist') ;


  vec1 = rand(1,3) 

  dist = VecDist(vec1) 
  dist1 = VecDist(vec1,1) 
  dist2 = VecDist(vec1,2) 
  distinf = VecDist(vec1,inf) 

  if itest == 0 ;
    gppause ;
  end;


elseif itest == 9 | itest == 0 ;

  disp('   ') ;
  disp('   ') ;
  disp('Test 9 of VecDist') ;


  vec1 = [ 1, 1, 1, 1; ...
          -1, 1, 1, 1; ...
           1,-1, 1, 1; ...
          -1, 1,-1, 1; ...
          -1,-1,-1, 1] 

  dist1 = VecDist(vec1,1) 
  dist2 = VecDist(vec1) 
  distinf = VecDist(vec1,inf) 

  if itest == 0 ;
    gppause ;
  end;



end ;



