1function test170 2%TEST170 test C<B>=A+B (alias M==B) 3 4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 5% SPDX-License-Identifier: Apache-2.0 6 7rng ('default') ; 8 9fprintf ('test170:\n') ; 10 11n = 30 ; 12 13A = GB_spec_random (n, n, 0.5, 1, 'double') ; 14A.sparsity = 2 ; % sparse 15 16B = GB_spec_random (n, n, 0.5, 1, 'double') ; 17B.sparsity = 2 ; % sparse 18 19C1 = spones (B.matrix) .* (A.matrix+B.matrix) ; 20C2 = GB_mex_AplusB_M_aliased (A, B, 'plus') ; 21GB_spec_compare (C1, C2) ; 22 23fprintf ('test170: all tests passed\n') ; 24 25