1function test110 2%TEST110 test accum/mask (binary search of M(:,j)) 3 4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 5% SPDX-License-Identifier: Apache-2.0 6 7fprintf ('\ntest110: test accum/mask (binary search of M(:,j))\n') ; 8 9rng ('default') 10 11m = 100 ; 12n = 100 ; 13M = spones (rand (m,n)) ; 14M (m,:) = 0 ; 15 16C = sprand (m, n, 0.01) ; 17A = sprand (m, n, 0.02) ; 18 19C1 = GB_mex_apply (C, M, 'plus', 'identity', A) ; 20C2 = GB_spec_apply (C, M, 'plus', 'identity', A, [ ]) ; 21GB_spec_compare (C1,C2) ; 22 23d.mask = 'complement' ; 24 25C1 = GB_mex_apply (C, M, 'plus', 'identity', A, d) ; 26C2 = GB_spec_apply (C, M, 'plus', 'identity', A, d) ; 27GB_spec_compare (C1,C2) ; 28 29fprintf ('\ntest110: all tests passed\n') ; 30 31