1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
function C = trans (arg1, arg2, arg3, arg4, arg5)
%GRB.TRANS transpose a sparse matrix.
%
% C = GrB.trans (A)
% C = GrB.trans (A, desc)
% C = GrB.trans (Cin, accum, A, desc)
% C = GrB.trans (Cin, M, A, desc)
% C = GrB.trans (Cin, M, accum, A, desc)
%
% The descriptor is optional. If desc.in0 is 'transpose', then C<M>=A or
% C<M>=accum(C,A) is computed, since the default behavior is to transpose
% the input matrix.
%
% For complex matrices, GrB.trans computes the array transpose, not the
% matrix (complex conjugate) transpose.
%
% See also GrB/transpose, GrB/ctranspose, GrB/conj.
% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
% SPDX-License-Identifier: Apache-2.0
if (isobject (arg1))
arg1 = arg1.opaque ;
end
if (nargin > 1 && isobject (arg2))
arg2 = arg2.opaque ;
end
if (nargin > 2 && isobject (arg3))
arg3 = arg3.opaque ;
end
if (nargin > 3 && isobject (arg4))
arg4 = arg4.opaque ;
end
switch (nargin)
case 1
[C, k] = gbtrans (arg1) ;
case 2
[C, k] = gbtrans (arg1, arg2) ;
case 3
[C, k] = gbtrans (arg1, arg2, arg3) ;
case 4
[C, k] = gbtrans (arg1, arg2, arg3, arg4) ;
case 5
[C, k] = gbtrans (arg1, arg2, arg3, arg4, arg5) ;
end
if (k == 0)
C = GrB (C) ;
end
|