double MAfTpQuad (const float R, const float x, int N)
Calculate a quadratic form for a symmetric Toeplitz matrix
This routine calculates a quadratic form S = x'R x, where x is a vector and
R is a symmetric Toeplitz matrix,
S = SUM SUM x(i) R(i,j) x(j) .
The elements of the matrix R are constant down diagonals, R(i,j) = R(|i-h|).
In this routine R is specified by its first column or row. The result is
accumulated as a double value and returned as a double value.
<- double MAfTpQuad
-> const float R
First column (or row) of the symmetric Toeplitz matrix (N values)
-> const float x
Vector of N values
-> int N
Number of elements in x and R
Author / revision
/ Revision 1.3 2003/05/09
Main Index libtsp