Version 0.1
A
is made through the user-supplied routine Aprod
with the prototype:
int Aprod( int mode, int m, int n, int nix, int ix[], double x[], double y[], void *ptrA );
At each call to Aprod
, BCLS will set the variable "mode" to describe if a product with A
or with A'
is required:
If mode == 1, compute y = A *x, with x untouched; and if mode == 2, compute x = A'*y, with y untouched.
The integers m
and n
describe the number of rows and columns in A
, and also the lengths of the vectors y
and x
, respectively.
This is important! Only some columns of A
are needed for any given matrix-vector multiply. The vector of indices ix
(with length nix
) describes which columns of A
should contribute to the product. In other words, Aprod
should return
if mode == 1, y = A(:, ix) * x(ix), where len(ix) = nix
(using Matlab notation). In fact, many of the calls to Aprod
have nix = 1
, so that only a single column of A
is required.
On the other hand,
if mode == 2, x(ix) = A(:, ix)' * y, where len(ix) = nix.
However, BCLS will simply ignore elements of x
that are not indexed by ix
, so that the call to Aprod
with mode == 2
is not as critical the mode == 1
call.
See the routine Aprod
in bcsol.c (under Examples) for an example of how to code this routine.
Generated on Sun Mar 4 22:50:03 2007 by Doxygen 1.5.1