File: sfmult.m

package info (click to toggle)
suitesparse 1%3A5.12.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 176,720 kB
  • sloc: ansic: 1,193,914; cpp: 31,704; makefile: 6,638; fortran: 1,927; java: 1,826; csh: 765; ruby: 725; sh: 529; python: 333; perl: 225; sed: 164; awk: 35
file content (28 lines) | stat: -rw-r--r-- 968 bytes parent folder | download | duplicates (5)
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
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.

error ('sfmult mexFunction not found') ;