MAfSyQuad
Routine

double MAfSyQuad (const float *A[], const float x[], int N)
Purpose

Calculate a quadratic form for a symmetric matrix
Description
This routine calculates the quadaratic form s = x'A x for vector x and
symmetric matrix A,
N1 N1
s = SUM SUM x(i) A(i,j) x(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)

> 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
MAfSyBilin,
MAfTpQuad
Main Index libtsp