# Addition and subtraction [Non-member C-style functions]

Collaboration diagram for Addition and subtraction:

Non-member methods that add or subtract one object from another. More...

## Functions

template<typename T>
void Add (DenseVector< T > &result, const Vector< T > &v1, const Vector< T > &v2, T scale=1)
Adds a scalar multiple of `v2` to `v1`, and stores the result.
template<typename T>
void AddTo (DenseVector< T > &result, const Vector< T > &v, T scale=1)
Adds a scalar multiple of `v` to `result`.
template<typename T>
void Add (DenseMatrix< T > &result, const Matrix< T > &m1, const Matrix< T > &m2, T scale=1)
Adds a scalar multiple of `m2` to `m1`, and stores the result.
template<typename T>
void AddTo (DenseMatrix< T > &result, const Matrix< T > &m, T scale=1)
Adds a scalar multiple of `m` to `result`.
template<typename T>
void Add (DenseVector< T > &result, const DenseVector< T > &v1, const DenseVector< T > &v2, T scale=1)
Adds a scalar multiple of `v2` to `v1`, and stores the result. Uses BLAS if possible (T = complex, double).
template<typename T>
void AddTo (DenseVector< T > &result, const DenseVector< T > &v, T scale=1)
Adds a scalar multiple of `v` to `result`. Uses BLAS if possible (T = complex, double).
template<typename T>
void Add (DenseMatrix< T > &result, const DenseMatrix< T > &m1, const DenseMatrix< T > &m2, T scale=1)
Adds a scalar multiple of `m2` to `m1`, and stores the result. Uses BLAS if possible (T = complex, double).
template<typename T>
void AddTo (DenseMatrix< T > &result, const DenseMatrix< T > &m, T scale=1)
Adds a scalar multiple of `m` to `result`. Uses BLAS if possible (T = complex, double).
template<>
void Add (DenseVector< double > &result, const DenseVector< double > &v1, const DenseVector< double > &v2, double scale)
Adds a scalar multiple of one DenseVector<double> to another, storing the result in a third. Uses BLAS if possible.
template<>
void AddTo (DenseVector< double > &result, const DenseVector< double > &v, double scale)
Adds a scalar multiple of one DenseVector<double> to another in place. Uses BLAS if possible.
template<>
void Add (DenseVector< complex > &result, const DenseVector< complex > &v1, const DenseVector< complex > &v2, complex scale)
Adds a scalar multiple of one DenseVector<complex> to another, and stores the result in another. Uses BLAS if possible.
template<>
void AddTo (DenseVector< complex > &result, const DenseVector< complex > &v, complex scale)
Adds a scalar multiple of one DenseVector<complex> to another. Uses BLAS if possible.
template<>
void Add (DenseMatrix< double > &result, const DenseMatrix< double > &m1, const DenseMatrix< double > &m2, double scale)
Adds a scalar multiple of one DenseMatrix<double> to another, storing the result in a third. Uses BLAS if possible.
template<>
void AddTo (DenseMatrix< double > &result, const DenseMatrix< double > &m, double scale)
Adds a scalar multiple of one DenseMatrix<double> to another in place. Uses BLAS if possible.
template<>
void Add (DenseMatrix< complex > &result, const DenseMatrix< complex > &m1, const DenseMatrix< complex > &m2, complex scale)
Adds a scalar multiple of one DenseMatrix<complex> to another, storing the result in a third. Uses BLAS if possible.
template<>
void AddTo (DenseMatrix< complex > &result, const DenseMatrix< complex > &m, complex scale)
Adds a scalar multiple of one DenseMatrix<complex> to another in place. Uses BLAS if possible.

## Detailed Description

Non-member methods that add or subtract one object from another.

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