1function [complex_binaryops complex_unaryops ] = GB_user_opsall 2%GB_USER_OPSALL return list of complex operators 3 4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 5% SPDX-License-Identifier: Apache-2.0 6 7% complex binary operators 8complex_binaryops = { 9% 11 operators where x,y,z are all the same class 10'first', % z = x 11'second', % z = y 12'pair', % z = 1 13'plus', % z = x + y 14'minus', % z = x - y 15'rminus', % z = y - x 16'times', % z = x * y 17'div', % z = x / y 18'rdiv', % z = y / x 19% comparison operators where x,y,z are all the same class 20'iseq', % z = (x == y) 21'isne', % z = (x != y) 22%---------------------------- 23% comparison operators where x,y are all the same class, z is logical 24'eq', % z = (x == y) 25'ne', % z = (x != y) 26%---------------------------- 27'complex' % z = complex (x,y) 28} ; 29 30complex_unaryops = { 31% 6 where x,z are complex 32'one', % z = 1 33'identity', % z = x 34'ainv', % z = -x 35'abs', % z = abs(x) (z is real) 36'minv' % z = 1/x 37'conj' % z = conj(x) 38%---------------------------- 39% 4 where x is complex, z is double 40'real' % z = real(x) 41'imag' % z = imag(x) 42'carg' % z = angle(x) 43} ; 44 45