1function test27 2%TEST27 test GxB_select with user-defined select op (LoHi_band) 3 4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 5% SPDX-License-Identifier: Apache-2.0 6 7fprintf ('test 27: GxB_select with user-defined op (LoHi_band)\n') ; 8 9for m = 1:10 10 for n = 1:10 11 fprintf ('.') ; 12 A = sprand (m, n, 0.1) ; 13 for lo = -12:12 14 for hi = -12:12 15 16 C1 = GB_mex_band (A, lo, hi, 0) ; 17 C2 = triu (tril (A,hi), lo) ; 18 assert (isequal (C1, C2)) ; 19 20 C1 = GB_mex_band (A, lo, hi, 1) ; 21 C2 = triu (tril (A',hi), lo) ; 22 assert (isequal (C1, C2)) ; 23 24 end 25 end 26 end 27end 28 29fprintf ('\ntest27: all tests passed\n') ; 30 31