Dot products [Non-member C-style functions]

Collaboration diagram for Dot products: External methods that compute the dot product between two objects. More...

Functions

template<typename T>
dot (const Vector< T > &v1, const Vector< T > &v2)
Returns the dot product between v1 and v2: .
template<typename T>
c_dot (const Vector< T > &v1, const Vector< T > &v2)
Returns the conjugate dot product between v1 and v2: .
template<typename T>
dot (const Matrix< T > &m1, const Matrix< T > &m2)
Returns the Hilbert-Schmidt dot product between m1 and m2: .
template<typename T>
c_dot (const Matrix< T > &m1, const Matrix< T > &m2)
Returns the Hilbert-Schmidt conjugate dot product between m1 and m2: .
template<typename T>
dot (const DenseVector< T > &v1, const DenseVector< T > &v2)
Returns the dot product between v1 and v2: .
template<typename T>
dot (const DenseMatrix< T > &m1, const DenseMatrix< T > &m2)
Returns the Hilbert-Schmidt dot product between m1 and m2: .
template<typename T>
c_dot (const DenseMatrix< T > &m1, const DenseMatrix< T > &m2)
Returns the Hilbert-Schmidt conjugate dot product between m1 and m2: .
template<>
double dot (const DenseVector< double > &v1, const DenseVector< double > &v2)
Computes the dot product between two DenseVector<double> objects. Uses BLAS if possible.
template<>
double c_dot (const DenseVector< double > &v1, const DenseVector< double > &v2)
Computes the conjugate dot product between two DenseVector<double> objects. Uses BLAS if possible.
template<>
complex dot (const DenseVector< complex > &v1, const DenseVector< complex > &v2)
Computes the dot product between two DenseVector<complex> objects. Uses BLAS if possible.
template<>
complex c_dot (const DenseVector< complex > &v1, const DenseVector< complex > &v2)
Computes the conjugate dot product between two DenseVector<complex> objects. Uses BLAS if possible.
template<>
double dot (const DenseMatrix< double > &m1, const DenseMatrix< double > &m2)
Computes the Hilbert-Schmidt dot product of two DenseMatrix<double> objects. Uses BLAS if possible.
template<>
double c_dot (const DenseMatrix< double > &m1, const DenseMatrix< double > &m2)
Computes the Hilbert-Schmidt conjugate dot product of two DenseMatrix<double> objects. Uses BLAS if possible.
template<>
complex dot (const DenseMatrix< complex > &m1, const DenseMatrix< complex > &m2)
Computes the dot product of two DenseMatrix<complex> objects. Uses BLAS if possible.
template<>
complex c_dot (const DenseMatrix< complex > &m1, const DenseMatrix< complex > &m2)
Computes the conjugate dot product of two DenseMatrix<complex> objects. Uses BLAS if possible.

Detailed Description

External methods that compute the dot product between two objects.

Function Documentation

 template T c_dot ( const Vector< T > & v1, const Vector< T > & v2 )
 Returns the conjugate dot product between v1 and v2: . This is usually the appropriate dot product to use for complex vectors, but it is not symmetric with respect to the arguments -- the first one is the one that gets conjugated!

 template<> double c_dot ( const DenseVector< double > & v1, const DenseVector< double > & v2 )
 Computes the conjugate dot product between two DenseVector objects. Uses BLAS if possible. For vectors of double, conjugation is trivial. Therefore, this simply duplicates the functionality of dot( v1, v2 ).

 template<> complex dot ( const DenseVector< complex > & v1, const DenseVector< complex > & v2 )
 Computes the dot product between two DenseVector objects. Uses BLAS if possible. This is probably not the function you're looking for; complex vectors should usually be conjugate dotted.

 template<> complex c_dot ( const DenseVector< complex > & v1, const DenseVector< complex > & v2 )
 Computes the conjugate dot product between two DenseVector objects. Uses BLAS if possible. This is usually the correct way to compute the dot product of two complex vectors, as a sesquilinear form.

 template<> double c_dot ( const DenseMatrix< double > & m1, const DenseMatrix< double > & m2 )
 Computes the Hilbert-Schmidt conjugate dot product of two DenseMatrix objects. Uses BLAS if possible. Since conjugation is trivial for real numbers, this duplicates the functionality of dot( m1, m2).

 template<> complex dot ( const DenseMatrix< complex > & m1, const DenseMatrix< complex > & m2 )
 Computes the dot product of two DenseMatrix objects. Uses BLAS if possible. This is computed as , which is usually not a very meaningful quantity for complex matrices. Consider whether you really want to use c_dot( m1, m2 ) instead.

 template<> complex c_dot ( const DenseMatrix< complex > & m1, const DenseMatrix< complex > & m2 )
 Computes the conjugate dot product of two DenseMatrix objects. Uses BLAS if possible. This is computed as , which is usually the right way to compute the dot product of two complex matrices.

Generated on Wed Jun 14 22:25:33 2006 for linalg by 1.4.4