1function C = all (G, option) 2%ALL True if all elements of a GraphBLAS matrix are nonzero or true. 3% C = all (G) is true if all entries in G are nonzero or true. If G is a 4% matrix, C is a row vector with C(j) = all (G (:,j)). 5% 6% C = all (G, 'all') is a scalar, true if all entries G are nonzero or true 7% C = all (G, 1) is a row vector with C(j) = all (G (:,j)) 8% C = all (G, 2) is a column vector with C(i) = all (G (i,:)) 9% 10% See also GrB/any, GrB/nnz, GrB/prod, GrB.entries. 11 12% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 13% SPDX-License-Identifier: GPL-3.0-or-later 14 15G = G.opaque ; 16 17if (nargin == 1) 18 C = GrB (gb_prod ('&.logical', 'logical', G)) ; 19else 20 C = GrB (gb_prod ('&.logical', 'logical', G, option)) ; 21end 22 23