1function test124
2%TEST124 GrB_extract, trigger case 6
3
4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
5% SPDX-License-Identifier: Apache-2.0
6
7fprintf ('test124: GrB_extract, trigger case 6\n') ;
8
9rng ('default') ;
10
11m = 1000 ;
12n = 1000 ;
13d = 1e6 / (m*n ) ;
14A = sprand (m, n, d) ;
15A (:,n) = sprand (n, 1, 0.8) ;
16huge = 1e9 ;
17A (huge,1) = 1 ;
18m = huge ;
19A (3,n) = 999 ;
20
21I = [3 4 1] ;
22C = A (I,:) ;
23
24I0 = uint64 (I) - 1 ;
25S = sparse (length (I), n) ;
26
27C2 = GB_mex_Matrix_extract (S, [ ], [ ], A, I0, [ ], [ ]) ;
28assert (isequal (C, C2.matrix)) ;
29
30fprintf ('test124: all tests passed\n') ;
31