1function testRB2 2%testRB2: test the RBio toolbox. UFget is required. 3% Note that UFget requires the Nov 25, 2006, revision of the UF_Index.mat file, 4% or later, to access all the Problems used by this test. 5% 6% Example: 7% testRB2 8% 9% See also UFget, RBread, RBreade, testRB1. 10 11% Copyright 2006, Timothy A. Davis 12 13Problem = UFget ('Meszaros/farm') ; 14% disp (Problem) ; 15A = RBread ('farm.rb') ; 16if (~isequal (A, Problem.A)) 17 error ('test failure: farm.rb') ; 18end 19% fprintf ('mtype: %s\n', RBtype (A)) ; 20mtype = RBtype (A) ; 21if (any (mtype ~= 'ira')) 22 error ('test failure: farm.rb') ; 23end 24 25Problem = UFget ('HB/bcsstk01') ; 26% disp (Problem) ; 27A = RBread ('bcsstk01.rb') ; 28if (~isequal (A, Problem.A)) 29 error ('test failure: bcsstk01.rb') ; 30end 31% fprintf ('mtype: %s\n', RBtype (A)) ; 32mtype = RBtype (A) ; 33if (any (mtype ~= 'rsa')) 34 error ('test failure: bcsstk01.rb') ; 35end 36 37Problem = UFget ('HB/lap_25') ; 38% disp (Problem) ; 39A = RBread ('lap_25.rb') ; 40if (~isequal (A, Problem.A)) 41 error ('test failure: lap_25.rb') ; 42end 43A = RBreade ('lap_25.pse') ; 44if (~isequal (A, Problem.A)) 45 error ('test failure: lap_25.pse') ; 46end 47% fprintf ('mtype: %s\n', RBtype (A)) ; 48mtype = RBtype (A) ; 49if (any (mtype ~= 'psa')) 50 error ('test failure: bcsstk01.rb') ; 51end 52 53Problem = UFget ('HB/west0479') ; 54% disp (Problem) ; 55[A Z] = RBread ('west0479.rb') ; 56if (~isequal (A, Problem.A)) 57 error ('test failure: west0479.rb') ; 58end 59if (~isequal (Z, Problem.Zeros)) 60 error ('test failure: west0479.rb') ; 61end 62[A Z] = RBread ('west0479.rua') ; 63if (~isequal (A, Problem.A)) 64 error ('test failure: west0479.rua') ; 65end 66if (~isequal (Z, Problem.Zeros)) 67 error ('test failure: west0479.rua') ; 68end 69% fprintf ('mtype: %s\n', RBtype (A)) ; 70mtype = RBtype (A) ; 71if (any (mtype ~= 'rua')) 72 error ('test failure: west0479.rua') ; 73end 74 75fprintf ('RB test 2: passed\n') ; 76 77