[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Vector transposition
From: |
Thomas Weber |
Subject: |
Re: [Help-gsl] Vector transposition |
Date: |
Wed, 07 Sep 2005 15:30:16 +0200 |
Hi Till,
I am sending this to the list (you replied to me only).
> i would need it to compute a generalized cross validation algorithm,
> actually there's a step in the procedure where i need to do x^T A x,
okay, so you need a scalar product (or dot product) with a matrix A,
namely <x, A*x>
y = A*x can be done with
gsl_blas_dgemv(CblasNoTrans, 1.0, A, x, 0.0, y)
<x, y> can then be done with
gsl_blas_ddot (x,y, &result)
where result is a double variable and everything involved is also of
double type.
The relevant chapter in the manual is
12. GSL BLAS Interface
Regards
Thomas