1function w = GB_spec_Vector_eWiseMult (w, mask, accum, mult, u, v, descriptor) 2%GB_SPEC_VECTOR_EWISEMULT a MATLAB mimic of GrB_Vector_eWiseMult 3% 4% Usage: 5% w = GB_spec_Vector_eWiseMult (w, mask, accum, mult, u, v, descriptor) 6% 7% Computes w<mask> = accum(w,t), in GraphBLAS notation, where t =u.*v, 8% The pattern of t is the union of u and v. 9 10% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 11% SPDX-License-Identifier: Apache-2.0 12 13%------------------------------------------------------------------------------- 14% get inputs 15%------------------------------------------------------------------------------- 16 17if (nargout > 1 || nargin ~= 7) 18 error ('usage: C = GB_spec_Vector_eWiseMult (w, mask, accum, mult, u, v, descriptor)') ; 19end 20 21% make sure u is a column vector 22if (isstruct (u)) 23 n = size (u.matrix, 2) ; 24else 25 n = size (u, 2); 26end 27if (n ~= 1) 28 error ('u must be a vector') ; 29end 30 31% GraphBLAS does not allow u or v to be transposed via the descriptor 32if (isfield (descriptor, 'inp0')) 33 descriptor = rmfield (descriptor, 'inp0') ; 34end 35if (isfield (descriptor, 'inp1')) 36 descriptor = rmfield (descriptor, 'inp1') ; 37end 38 39w = GB_spec_Matrix_eWiseMult (w, mask, accum, mult, u, v, descriptor) ; 40 41 42