1function C = gammaln (G) 2%GAMMALN logarithm of gamma function. 3% C = gammaln (G) is the natural logarithm of the gamma function of each 4% entry of G. Since gammaln (0) = inf, the result is a full matrix. 5% G must be real. 6% 7% See also GrB/gammaln. 8 9% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 10% SPDX-License-Identifier: GPL-3.0-or-later 11 12G = G.opaque ; 13type = gbtype (G) ; 14if (contains (type, 'complex')) 15 error ('input must be real') ; 16end 17if (~gb_isfloat (type)) 18 type = 'double' ; 19end 20 21C = GrB (gbapply ('gammaln', gbfull (G, type))) ; 22 23