1function s = isfull (A)
2%GRB.ISFULL determine if all entries are present.
3% For either a GraphBLAS or MATLAB matrix, GrB.isfull (A) is true if
4% numel(A) == nnz(A).  GrB.isfull (A) is always true if A is a GraphBLAS
5% or MATLAB full matrix.
6%
7% See also GrB/issparse, GrB/full.
8
9% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
10% SPDX-License-Identifier: GPL-3.0-or-later
11
12if (isobject (A))
13    % GraphBLAS matrix
14    A = A.opaque ;
15    s = gb_isfull (A) ;
16elseif (issparse (A))
17    % MATLAB sparse matrix
18    s = (numel (A) == nnz (A)) ;
19else
20    % MATLAB full matrix, string, struct, etc
21    s = true ;
22end
23
24