1function test165
2%TEST165 test C=A*B' where A is diagonal and B becomes bitmap
3
4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
5% SPDX-License-Identifier: Apache-2.0
6
7rng ('default') ;
8
9n = 10 ;
10D.matrix = sparse (1:n, 1:n, rand (n,1)) ;
11D.pattern = logical (speye (n)) ;
12D.class = 'double' ;
13
14d = 0.5 ;
15B = GB_spec_random (n, n, d, 1, 'double') ;
16Cin = sparse (n, n) ;
17
18semiring.add = 'plus' ;
19semiring.multiply = 'times' ;
20semiring.class = 'double' ;
21dnt = struct ('inp1', 'tran') ;
22
23C1 = D.matrix*B.matrix' ;
24C2 = GB_mex_mxm (Cin, [ ], [ ], semiring, D, B, dnt) ;
25GB_spec_compare (C1, C2) ;
26
27fprintf ('test165: all tests passed\n') ;
28
29