Boost logo

Glas :

Re: [glas] norms and inner products for vectors of matrices

From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2006-01-17 04:15:08


Hi,

Here is a question about nested vectors.

Suppose I have
vector< vector< double > > v ;
vector< double > w ;
double d ;

d*v : scalar times vector;
trans(w)*w: dot product of vector of vector with vector of vector: sum_i
trans(w[i])*w[i]
trans(v)*v: dot product of vector with vector: sum_i v[i]*v[i]

How should trans(v)*w be interpreted?
* result is a vector<double> which is the sum: sum_i v[i]*w[i] ?
* result is a vector<double> with element i being: trans(v)*w[i] ?

Best,

Karl