File: ssmult.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 (37 lines) | stat: -rw-r--r-- 1,371 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
32
33
34
35
36
37
function C = ssmult (A,B, at,ac, bt,bc, ct,cc)                              %#ok
%SSMULT multiplies two sparse matrices.
% C = ssmult (A,B) computes C=A*B where A and B are sparse.  This function is
% typically faster than C=A*B in MATLAB 7.4, and always uses less memory.
% Either A or B, or both, can be complex.
%
% Example:
%   load west0479
%   A = west0479 ;
%   B = sprand (west0479) ;
%   C = A*B ;
%   D = ssmult (A,B) ;
%   C-D
%
% This function can also compute any of the 64 combinations of
% C = op (op(A) * op(B)) where op(A) is A, A', A.', or conj(A).
% The general form is
%
%   C = ssmult (A,B, at,ac, bt,bc, ct,cc)
%
% where at = 0 or 1 to transpose A or not, and ac = 0 or 1 to use the conjugate
% of A, or not.  If not present, these 6 terms default to 0.  For example,
% these pairs of expressions are identical:
%
%   ssmult (A,B, 1,1, 0,0, 0,0)             A'*B
%   ssmult (A,B, 0,1, 0,0, 0,0)             conj(A)*B
%   ssmult (A,B, 1,0, 0,0, 0,0)             A.'*B
%   ssmult (A,B, 0,0, 0,0, 0,0)             A*B
%   ssmult (A,B, 0,0, 1,1, 0,0)             A*B'
%   ssmult (A,B, 0,1, 0,0, 1,1)             (conj(A)*B)'
%
% See also ssmultsym, mtimes.  See sstest3 for a list of all 64 variants.

% SSMULT, Copyright (c) 2007-2011, Timothy A Davis. All Rights Reserved.
% SPDX-License-Identifier: GPL-2.0+

error ('ssmult mexFunction not found') ;