1function [m, n] = size (G, dim)
2%SIZE the dimensions of a matrix.
3% [m n] = size (G) is the size of an m-by-n sparse matrix.
4% If any dimension exceeds flintmax (2^53), m and n are returned as int64.
5%
6% See also GrB/length, GrB/numel.
7
8% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
9% SPDX-License-Identifier: GPL-3.0-or-later
10
11G = G.opaque ;
12[m, n] = gbsize (G) ;
13
14if (nargin == 2)
15    s = [m n] ;
16    m = s (dim) ;
17elseif (nargout == 1)
18    m = [m n] ;
19end
20
21