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
|
function y = sfmult (A,x, at,ac, xt,xc, yt,yc)
% y = sfmult (A,x, at,ac, xt,xc, yt,yc) where A is sparse and x is full
% y = sfmult (x,A, at,ac, xt,xc, yt,yc) where A is sparse and x is full
%
% Computes y = A*x, x*A, or other variants.
%
% at and ac control how the sparse matrix A is accessed:
%
% y=A*x at = 0, ac = 0
% y=A.'*x at = 1, ac = 0
% y=conj(A)*x at = 0, ac = 1
% y=A'*x at = 1, ac = 1
%
% xt and xc modify x in the same way.
% yt and yc modify the result y. Thus, to compute y = (A.' *x)' use:
%
% y = sfmult (A, x, 1,0, 0,0, 1,1) ;
%
% To compute y = (x *A.')' do the following:
%
% y = sfmult (x, A, 1,0, 0,0, 1,1) ;
%
% The transpose of A is never computed. Thus function requires workspace of
% size up to 4*size(A,1) if x is a matrix. No workspace is required if x is
% a row or column vector. At most 2*size(A,1) workspace is required if
% min(size(x)) is 2.
% SFMULT, Copyright (c) 2009, Timothy A Davis. All Rights Reserved.
% SPDX-License-Identifier: BSD-3-clause
error ('sfmult mexFunction not found') ;
|