1function gbtest15
2%GBTEST15 list all unary operators
3
4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
5% SPDX-License-Identifier: GPL-3.0-or-later
6
7types = gbtest_types ;
8ops = { 'identity', '~', '-', '1', 'minv', 'abs',  'sqrt', 'log', ...
9    'exp', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', ...
10    'sinh', 'cosh', 'tanh', 'asinh', 'acosh', 'atanh', ...
11    'signum', 'ceil', 'floor', 'round', 'trunc', 'pow2', ...
12    'expm1', 'log10', 'log1p', 'log2', 'lgamma', 'tgamma', 'erf', ...
13    'erfc', 'conj', 'creal', 'cimag', 'carg', 'isinf', 'isnan', ...
14    'isinfinite', 'frexpx', 'frexpe', 'i0', 'i1', 'j0', 'j1' } ;
15
16nops = 0 ;
17for k1 = 1:length (ops)
18    for k2 = 1:length (types)
19        op = [ops{k1} '.' types{k2}] ;
20        fprintf ('\nop: (%s)\n', op) ;
21        try
22            GrB.unopinfo (op) ;
23            GrB.unopinfo (ops {k1}, types {k2}) ;
24            nops = nops + 1 ;
25        catch
26        end
27    end
28end
29
30fprintf ('\nhelp GrB.unopinfo:\n') ;
31GrB.unopinfo ;
32
33fprintf ('number of unary ops: %d\n', nops) ;
34assert (nops == 212) ;
35
36fprintf ('gbtest15: all tests passed\n') ;
37
38
39