MAfSyBilin
Routine
-
double MAfSyBilin (const float *A[], const float x[], const float y[],
int N)
Purpose
-
Calculate a bilinear form for a symmetric matrix
Description
This routine calculates the bilinear form s = x'A y for vectors x and y, and
symmetric matrix A,
N-1 N-1
s = SUM SUM x(i) A(i,j) y(j) .
i=0 j=0
The symmetry of A is used to reduce the number of computations. The result
is accumulated as a double value and returned as a double value.
Parameters
-
<- double MAfSyBilin
-
Returned value
-
-> const float *A[]
-
A is an array of pointers to the rows of an N by N matrix. The matrix
is assumed to be symmetric. Only the lower triangular portion of the
matrix is accessed. Note that with ANSI C, if the actual parameter
is not declared to have the const attribute, an explicit cast to
(const float **) is required.
-
-> const float x[]
-
Input vector (N elements)
-
-> const float y[]
-
Input vector (N elements)
-
-> int N
-
Number of of elements in x and y and the size of A
Author / revision
P. Kabal
/ Revision 1.5 2003/05/09
See Also
MAfSyQuad,
MAfTpQuad
Main Index libtsp