f06pa computes the matrix-vector product for a real general matrix or its transpose.

Syntax

C#
public static void f06pa(
	string trans,
	int m,
	int n,
	double alpha,
	double[,] a,
	double[] x,
	int incx,
	double beta,
	double[] y,
	int incy,
	out int ifail
)
Visual Basic
Public Shared Sub f06pa ( _
	trans As String, _
	m As Integer, _
	n As Integer, _
	alpha As Double, _
	a As Double(,), _
	x As Double(), _
	incx As Integer, _
	beta As Double, _
	y As Double(), _
	incy As Integer, _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
static void f06pa(
	String^ trans, 
	int m, 
	int n, 
	double alpha, 
	array<double,2>^ a, 
	array<double>^ x, 
	int incx, 
	double beta, 
	array<double>^ y, 
	int incy, 
	[OutAttribute] int% ifail
)
F#
static member f06pa : 
        trans : string * 
        m : int * 
        n : int * 
        alpha : float * 
        a : float[,] * 
        x : float[] * 
        incx : int * 
        beta : float * 
        y : float[] * 
        incy : int * 
        ifail : int byref -> unit 

Parameters

trans
Type: System..::..String
On entry: specifies the operation to be performed.
trans="N"
yαAx+βy.
trans="T" or "C"
yαATx+βy.
Constraint: trans="N", "T" or "C".
m
Type: System..::..Int32
On entry: m, the number of rows of the matrix A.
Constraint: m0.
n
Type: System..::..Int32
On entry: n, the number of columns of the matrix A.
Constraint: n0.
alpha
Type: System..::..Double
On entry: the scalar α.
a
Type: array<System..::..Double,2>[,](,)[,][,]
An array of size [dim1, dim2]
Note: dim1 must satisfy the constraint: dim1max1,m
Note: the second dimension of the array a must be at least n.
On entry: the m by n matrix A.
x
Type: array<System..::..Double>[]()[][]
An array of size [dim1]
Note: the dimension of the array x must be at least max1,1+n-1×incx if trans="N" and at least max1,1+m-1×incx if trans="T" or "C".
On entry: the vector x.
If trans="N",
  • if incx>0, xi must be stored in x[1+i-1×incx-1], for i=1,2,,n;
  • if incx<0, xi must be stored in x[1-n-i×incx-1], for i=1,2,,n.
If trans="T" or "C",
  • if incx>0, xi must be stored in x[1+i-1×incx-1], for i=1,2,,m;
  • if incx<0, xi must be stored in x[1-m-i×incx-1], for i=1,2,,m.
incx
Type: System..::..Int32
On entry: the increment in the subscripts of x between successive elements of x.
Constraint: incx0.
beta
Type: System..::..Double
On entry: the scalar β.
y
Type: array<System..::..Double>[]()[][]
An array of size [dim1]
Note: the dimension of the array y must be at least max1,1+m-1×incy if trans="N" and at least max1,1+n-1×incy if trans="T" or "C".
On entry: the vector y, if beta=0.0, y need not be set.
If trans="N",
  • if incy>0, yi must be stored in y[1+i-1×incy-1], for i=1,2,,m;
  • if incy<0, yi must be stored in y[1-m-i×incy-1], for i=1,2,,m.
If trans="T" or "C",
  • if incy>0, yi must be stored in y[1+i-1×incy-1], for i=1,2,,n;
  • if incy<0, yi must be stored in y[1-n-i×incy-1], for i=1,2,,n.
On exit: the updated vector y stored in the array elements used to supply the original vector y.
incy
Type: System..::..Int32
On entry: the increment in the subscripts of y between successive elements of y.
Constraint: incy0.
ifail
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error (see [Error Indicators and Warnings]).

Description

f06pa performs one of the matrix-vector operations
yαAx+βy,   or  yαATx+βy,
where A is an m by n real matrix, x and y are real vectors, and α and β are real scalars.
If m=0 or n=0, no operation is performed.

References

None.

Error Indicators and Warnings

ifail=-9000
An error occured, see message report.
ifail=-6000
Invalid Parameters value
ifail=-4000
Invalid dimension for array value
ifail=-8000
Negative dimension for array value
ifail=-6000
Invalid Parameters value
ifail=-6000
Invalid Parameters value

Accuracy

Not applicable.

Parallelism and Performance

None.

Further Comments

None.

Example

See Also