Vector with linear algebra naming convention.
[Collection of vector operations for all scalar types.]


Functions

template<class Scalar>
void Thyra::assign (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha)
 Assign all elements to a scalar: y(i) = alpha, i = 0...y->space()->dim()-1.
template<class Scalar>
void Thyra::assign (const Ptr< VectorBase< Scalar > > &y, const VectorBase< Scalar > &x)
 Vector assignment: y(i) = x(i), i = 0...y->space()->dim()-1.
template<class Scalar>
void Thyra::Vp_S (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha)
 Add a scalar to all elements: y(i) += alpha, i = 0...y->space()->dim()-1.
template<class Scalar>
void Thyra::Vt_S (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha)
 Scale all elements by a scalar: y(i) *= alpha, i = 0...y->space()->dim()-1.
template<class Scalar>
void Thyra::V_StV (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha, const VectorBase< Scalar > &x)
 Assign scaled vector: y(i) = alpha * x(i), i = 0...y->space()->dim()-1.
template<class Scalar>
void Thyra::Vp_StV (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha, const VectorBase< Scalar > &x)
 AXPY: y(i) = alpha * x(i) + y(i), i = 0...y->space()->dim()-1.
template<class Scalar>
void Thyra::Vp_V (const Ptr< VectorBase< Scalar > > &y, const VectorBase< Scalar > &x, const Scalar &beta=Teuchos::ScalarTraits< Scalar >::one())
 y(i) = x(i) + beta*y(i), i = 0...y->space()->dim()-1.
template<class Scalar>
void Thyra::V_V (const Ptr< VectorBase< Scalar > > &y, const VectorBase< Scalar > &x)
 y(i) = x(i), i = 0...y->space()->dim()-1.
template<class Scalar>
void Thyra::V_S (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha)
 y(i) = alpha, i = 0...y->space()->dim()-1.
template<class Scalar>
void Thyra::V_VpV (const Ptr< VectorBase< Scalar > > &z, const VectorBase< Scalar > &x, const VectorBase< Scalar > &y)
 z(i) = x(i) + y(i), i = 0...z->space()->dim()-1.
template<class Scalar>
void Thyra::V_VmV (const Ptr< VectorBase< Scalar > > &z, const VectorBase< Scalar > &x, const VectorBase< Scalar > &y)
 z(i) = x(i) - y(i), i = 0...z->space()->dim()-1.
template<class Scalar>
void Thyra::V_StVpV (const Ptr< VectorBase< Scalar > > &z, const Scalar &alpha, const VectorBase< Scalar > &x, const VectorBase< Scalar > &y)
 z(i) = alpha*x(i) + y(i), i = 0...z->space()->dim()-1.
template<class Scalar>
void Thyra::V_VpStV (const Ptr< VectorBase< Scalar > > &z, const VectorBase< Scalar > &x, const Scalar &alpha, const VectorBase< Scalar > &y)
 z(i) = x(i) + alpha*y(i), i = 0...z->space()->dim()-1.
template<class Scalar>
void Thyra::V_StVpStV (const Ptr< VectorBase< Scalar > > &z, const Scalar &alpha, const VectorBase< Scalar > &x, const Scalar &beta, const VectorBase< Scalar > &y)
 z(i) = alpha*x(i) + beta*y(i), i = 0...z->space()->dim()-1.

Detailed Description

These functions a just simpler ways to call the functions defined here.

The convention used here is described in the short note A Simple Convention for the Specification of Linear Algebra Function Prototypes in C++ .


Function Documentation

template<class Scalar>
void Thyra::assign const Ptr< VectorBase< Scalar > > &  y,
const Scalar &  alpha
 

Assign all elements to a scalar: y(i) = alpha, i = 0...y->space()->dim()-1.

template<class Scalar>
void Thyra::assign const Ptr< VectorBase< Scalar > > &  y,
const VectorBase< Scalar > &  x
 

Vector assignment: y(i) = x(i), i = 0...y->space()->dim()-1.

template<class Scalar>
void Thyra::Vp_S const Ptr< VectorBase< Scalar > > &  y,
const Scalar &  alpha
 

Add a scalar to all elements: y(i) += alpha, i = 0...y->space()->dim()-1.

template<class Scalar>
void Thyra::Vt_S const Ptr< VectorBase< Scalar > > &  y,
const Scalar &  alpha
 

Scale all elements by a scalar: y(i) *= alpha, i = 0...y->space()->dim()-1.

This takes care of the special cases of alpha == 0.0 (set y = 0.0) and alpha == 1.0 (don't do anything).

template<class Scalar>
void Thyra::V_StV const Ptr< VectorBase< Scalar > > &  y,
const Scalar &  alpha,
const VectorBase< Scalar > &  x
 

Assign scaled vector: y(i) = alpha * x(i), i = 0...y->space()->dim()-1.

Examples:
sillyPowerMethod.hpp.

template<class Scalar>
void Thyra::Vp_StV const Ptr< VectorBase< Scalar > > &  y,
const Scalar &  alpha,
const VectorBase< Scalar > &  x
 

AXPY: y(i) = alpha * x(i) + y(i), i = 0...y->space()->dim()-1.

Examples:
sillyCgSolve.hpp.

template<class Scalar>
void Thyra::Vp_V const Ptr< VectorBase< Scalar > > &  y,
const VectorBase< Scalar > &  x,
const Scalar &  beta = Teuchos::ScalarTraits< Scalar >::one()
 

y(i) = x(i) + beta*y(i), i = 0...y->space()->dim()-1.

template<class Scalar>
void Thyra::V_V const Ptr< VectorBase< Scalar > > &  y,
const VectorBase< Scalar > &  x
 

y(i) = x(i), i = 0...y->space()->dim()-1.

Examples:
sillyCgSolve.hpp.

template<class Scalar>
void Thyra::V_S const Ptr< VectorBase< Scalar > > &  y,
const Scalar &  alpha
 

y(i) = alpha, i = 0...y->space()->dim()-1.

template<class Scalar>
void Thyra::V_VpV const Ptr< VectorBase< Scalar > > &  z,
const VectorBase< Scalar > &  x,
const VectorBase< Scalar > &  y
 

z(i) = x(i) + y(i), i = 0...z->space()->dim()-1.

template<class Scalar>
void Thyra::V_VmV const Ptr< VectorBase< Scalar > > &  z,
const VectorBase< Scalar > &  x,
const VectorBase< Scalar > &  y
 

z(i) = x(i) - y(i), i = 0...z->space()->dim()-1.

template<class Scalar>
void Thyra::V_StVpV const Ptr< VectorBase< Scalar > > &  z,
const Scalar &  alpha,
const VectorBase< Scalar > &  x,
const VectorBase< Scalar > &  y
 

z(i) = alpha*x(i) + y(i), i = 0...z->space()->dim()-1.

template<class Scalar>
void Thyra::V_VpStV const Ptr< VectorBase< Scalar > > &  z,
const VectorBase< Scalar > &  x,
const Scalar &  alpha,
const VectorBase< Scalar > &  y
 

z(i) = x(i) + alpha*y(i), i = 0...z->space()->dim()-1.

template<class Scalar>
void Thyra::V_StVpStV const Ptr< VectorBase< Scalar > > &  z,
const Scalar &  alpha,
const VectorBase< Scalar > &  x,
const Scalar &  beta,
const VectorBase< Scalar > &  y
 

z(i) = alpha*x(i) + beta*y(i), i = 0...z->space()->dim()-1.


Generated on Sun Nov 23 12:13:06 2008 for Thyra Operator/Vector Support by  doxygen 1.3.9.1