# Subset of vector operations for types supporting relational operators. [Collection of all vector operations]

## Functions

template<class Scalar>
Scalar Thyra::min (const VectorBase< Scalar > &x)
Min element: `result = min{ x(i), i = 0...x.space()->dim()-1 } `.
template<class Scalar>
void Thyra::min (const VectorBase< Scalar > &x, Scalar *maxEle, Index *maxIndex)
Min element and its index: Returns `maxEle = x(k)` and `maxIndex = k` such that `x(k) <= x(i)` for all `i = 0...x.space()->dim()-1`.
template<class Scalar>
void Thyra::minGreaterThanBound (const VectorBase< Scalar > &x, const Scalar &bound, Scalar *minEle, Index *minIndex)
Minimum element greater than some bound and its index: Returns `minEle = x(k)` and `minIndex = k` such that `x(k) <= x(i)` for all `i` where `x(i) > bound`.
template<class Scalar>
Scalar Thyra::max (const VectorBase< Scalar > &x)
Max element: `result = max{ x(i), i = 1...n } `.
template<class Scalar>
void Thyra::max (const VectorBase< Scalar > &x, Scalar *maxEle, Index *maxIndex)
Max element and its index: Returns `maxEle = x(k)` and `maxIndex = k` such that `x(k) >= x(i)` for `i = 0...x.space()->dim()-1`.
template<class Scalar>
void Thyra::maxLessThanBound (const VectorBase< Scalar > &x, const Scalar &bound, Scalar *maxEle, Index *maxIndex)
Max element less than bound and its index: Returns `maxEle = x(k)` and `maxIndex = k` such that `x(k) >= x(i)` for all `i` where `x(i) < bound`.

## Detailed Description

Warning! do not try to instantiate these functions for complex types where relational operators are not defined (i.e. <, >, <=, >= etc).

## Function Documentation

 template Scalar Thyra::min ( const VectorBase< Scalar > & x )
 Min element: `result = min{ x(i), i = 0...x.space()->dim()-1 } `. Definition at line 454 of file Thyra_VectorStdOps.hpp.

 template void Thyra::min ( const VectorBase< Scalar > & x, Scalar * maxEle, Index * maxIndex )

Min element and its index: Returns `maxEle = x(k)` and `maxIndex = k` such that `x(k) <= x(i)` for all `i = 0...x.space()->dim()-1`.

Parameters:
 x [in] Input vector. minEle [out] The minimum element value. maxindex [out] The global index of the minimum element. If there is more than one element with the maximum entry then this returns the lowest index in order to make the output independent of the order of operations.
Preconditions:
• `minEle!=NULL`
• `minIndex!=NULL`

Definition at line 463 of file Thyra_VectorStdOps.hpp.

 template void Thyra::minGreaterThanBound ( const VectorBase< Scalar > & x, const Scalar & bound, Scalar * minEle, Index * minIndex )

Minimum element greater than some bound and its index: Returns `minEle = x(k)` and `minIndex = k` such that `x(k) <= x(i)` for all `i` where `x(i) > bound`.

Parameters:
 x [in] Input vector. bound [in] The upper bound minEle [out] The minimum element value as defined above. minIndex [out] The global index of the maximum element. If there is more than one element with the minimum value then this returns the lowest index in order to make the output independent of the order of operations. If no entries are less than `bound` then `minIndex < 0` on return.
Preconditions:
• `minEle!=NULL`
• `minIndex!=NULL`

Postconditions:

• If `*minIndex > 0` then such an element was found.
• If `*minIndex < 0` then no such element was found.

Definition at line 475 of file Thyra_VectorStdOps.hpp.

 template Scalar Thyra::max ( const VectorBase< Scalar > & x )
 Max element: `result = max{ x(i), i = 1...n } `. Definition at line 487 of file Thyra_VectorStdOps.hpp.

 template void Thyra::max ( const VectorBase< Scalar > & x, Scalar * maxEle, Index * maxIndex )

Max element and its index: Returns `maxEle = x(k)` and `maxIndex = k` such that `x(k) >= x(i)` for `i = 0...x.space()->dim()-1`.

Parameters:
 x [in] Input vector. maxEle [out] The maximum element value. maxindex [out] The global index of the maximum element. If there is more than one element with the maximum value then this returns the lowest index in order to make the output independent of the order of operations.
Preconditions:
• `maxEle!=NULL`
• `maxIndex!=NULL`

Definition at line 497 of file Thyra_VectorStdOps.hpp.

 template void Thyra::maxLessThanBound ( const VectorBase< Scalar > & x, const Scalar & bound, Scalar * maxEle, Index * maxIndex )

Max element less than bound and its index: Returns `maxEle = x(k)` and `maxIndex = k` such that `x(k) >= x(i)` for all `i` where `x(i) < bound`.

Parameters:
 x [in] Input vector. bound [in] The upper bound maxEle [out] The maximum element value as defined above. maxindex [out] The global index of the maximum element. If there is more than one element with the maximum index then this returns the lowest index in order to make the output independent of the order of operations. If no entries are less than `bound` then `minIndex < 0` on return.
Preconditions:
• `maxEle!=NULL`
• `maxIndex!=NULL`

Postconditions:

• If `*maxIndex > 0` then such an element was found.
• If `*maxIndex < 0` then no such element was found.

Definition at line 509 of file Thyra_VectorStdOps.hpp.

Generated on Thu Sep 18 12:33:10 2008 for Thyra Package Browser (Single Doxygen Collection) by  1.3.9.1