File: sfmult.m

package info (click to toggle)
suitesparse 1%3A7.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 254,920 kB
  • sloc: ansic: 1,134,743; cpp: 46,133; makefile: 4,875; fortran: 2,087; java: 1,826; sh: 996; ruby: 725; python: 495; asm: 371; sed: 166; awk: 44
file content (31 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (2)
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') ;