Public Member Functions | |
Constructors, Destructors, and Assignment Operators | |
Vector () | |
Vector (Handleable< VectorBase< Scalar > > *rawPtr) | |
Vector (const RefCountPtr< VectorBase< Scalar > > &smartPtr) | |
template<int N> | |
Vector (const LCN< Scalar, N > &x) | |
Construct a vector from an N-term LC. | |
Vector< Scalar > & | operator= (const LCN< Scalar, 1 > &x) |
Assign a one-term LC to this vector. | |
Vector< Scalar > & | operator= (const LCN< Scalar, 2 > &x) |
Assign a two-term LC to this vector. | |
Vector< Scalar > & | operator= (const LCN< Scalar, 3 > &x) |
Assign a three-term LC to this vector. | |
template<int N> | |
Vector< Scalar > & | operator= (const LCN< Scalar, N > &x) |
Assign an N-term LC to this vector. | |
Operators with assignment | |
Vector< Scalar > & | operator+= (const Vector< Scalar > &other) |
Vector< Scalar > & | operator+= (const LCN< Scalar, 1 > &x) |
Vector< Scalar > & | operator+= (const LCN< Scalar, 2 > &x) |
template<int N> | |
Vector< Scalar > & | operator+= (const LCN< Scalar, N > &x) |
Vector< Scalar > & | operator-= (const Vector< Scalar > &other) |
Vector< Scalar > & | operator-= (const LCN< Scalar, 1 > &x) |
Vector< Scalar > & | operator-= (const LCN< Scalar, 2 > &x) |
template<int N> | |
Vector< Scalar > & | operator-= (const LCN< Scalar, N > &x) |
Vector< Scalar > & | operator*= (const Scalar &a) |
Vector< Scalar > & | operator/= (const Scalar &a) |
Structural information | |
VectorSpace< Scalar > | space () const |
My space. | |
const MPIComm & | comm () const |
My communicator. | |
int | dim () const |
My dimension. | |
Block operations | |
int | numBlocks () const |
get number of blocks | |
void | setBlock (int i, const Vector< Scalar > &v) |
set the i-th block | |
const Vector< Scalar > & | getBlock (int i) const |
get the i-th block | |
Vector< Scalar > | getNonConstBlock (int i) |
get the i-th block | |
const Vector< Scalar > & | getBlock (const BlockIterator< Scalar > &b) const |
get the i-th block | |
Vector< Scalar > | getNonConstBlock (const BlockIterator< Scalar > &b) |
get the i-th block | |
Sequential data accessors | |
ConstDataChunk< Scalar > | nextConstChunk () const |
Get the next chunk of values for read-only access. | |
NonConstDataChunk< Scalar > | nextChunk () |
Get the next chunk of values for read-write access. | |
bool | hasMoreChunks () const |
Tell whether there are more chunks remaining to be accessed. | |
void | rewind () const |
Reset the data stream back to a state where all chunks are considered unread. | |
Random access to local elements | |
const Scalar & | operator[] (int localIndex) const |
const bracket operator for read-only random access to local elements as specified by a flat index that runs from 0 to space().numLocalElements(). If the vector does not consist of a single contiguous data chunk, this might be slow (worst case would be O(N), if every element is stored in its own chunk of length 1). | |
Scalar & | operator[] (int localIndex) |
non-const bracket operator for read-write random access to local elements as specified by a flat index that runs from 0 to space().numLocalElements(). If the vector does not consist of a single contiguous data chunk, this might be slow (worst case would be O(N), if every element is stored in its own chunk of length 1). | |
const Scalar & | operator() (const BlockIterator< Scalar > &b, int localIndexWithinBlock) const |
parentheses operator for read-only random access to local elements as specified by a block iterator and a flat index indicating the element's location within that block. | |
Scalar & | operator() (const BlockIterator< Scalar > &b, int localIndexWithinBlock) |
parentheses operator for read-write random access to local elements as specified by a block iterator and a flat index indicating the element's location within that block. | |
Diagnostic output | |
std::string | description () const |
Return a short string description of the vector. | |
void | print (std::ostream &os) const |
Print the vector in some detail. | |
Math operations | |
Vector< Scalar > & | scale (const Scalar &alpha) |
Multiply this vector by a constant scalar factor. | |
Vector< Scalar > & | update (const Scalar &alpha, const Vector< Scalar > &x, const Scalar &gamma=1.0) |
Add a scaled vector to this vector times a constant: ![]() | |
Vector< Scalar > & | update (const Scalar &alpha, const Vector< Scalar > &x, const Scalar &beta, const Vector< Scalar > &y, const Scalar &gamma) |
Add two scaled vectors to this vector times a constant: ![]() | |
Vector< Scalar > & | update (const Scalar &alpha, const Vector< Scalar > &x, const Scalar &beta, const Vector< Scalar > &y, const Scalar &gamma, const Vector< Scalar > &z, const Scalar &delta) |
Add three scaled vectors to this vector times a constant: ![]() | |
Vector< Scalar > & | acceptCopyOf (const Vector< Scalar > &x) |
Copy the values of another vector into this vector. | |
Vector< Scalar > | copy () const |
Create a new vector that is a copy of this vector. | |
Vector< Scalar > & | selfDotStar (const Vector< Scalar > &other) |
In-place element-by-element product (Matlab dot-star operator). | |
Vector< Scalar > & | selfDotSlash (const Vector< Scalar > &other) |
In-place element-by-element division (Matlab dot-slash operator). | |
Vector< Scalar > | dotStar (const Vector< Scalar > &other) const |
Element-by-element product (Matlab dot-star operator). | |
Vector< Scalar > | dotSlash (const Vector< Scalar > &other) const |
Element-by-element division (Matlab dot-slash operator). | |
Vector< Scalar > | reciprocal () const |
Return element-by-element reciprocal as a new vector. | |
Vector< Scalar > | abs () const |
Return element-by-element absolute value as a new vector. | |
Vector< Scalar > & | selfReciprocal () |
Overwrite self with element-by-element reciprocal. | |
Vector< Scalar > & | selfAbs () |
Overwrite self with element-by-element absolute value. | |
Vector< Scalar > & | randomize () |
Overwrite self with random values. | |
void | setToConstant (const Scalar &alpha) |
Set all elements to a constant value. | |
Scalar | dot (const Vector< Scalar > &other) const |
Take dot product with another vector. | |
Scalar | operator* (const Vector< Scalar > &other) const |
Overloaded operator for dot product. | |
Scalar | norm1 () const |
Compute the 1-norm of this vector. | |
Scalar | norm2 () const |
Compute the 2-norm of this vector. | |
Scalar | norm2 (const Vector< Scalar > &weights) const |
Compute the weighted 2-norm of this vector. | |
Scalar | normInf () const |
Compute the infinity-norm of this vector. | |
void | zero () |
Set all elements to zero. | |
Scalar | max () const |
Return the max element. | |
Scalar | min () const |
Return the min element. | |
Functor application | |
template<class UF > | |
Vector< Scalar > & | applyUnaryFunctor (const UF &functor) |
Apply a unary functor, overwriting this vector with the results. | |
template<class UF > | |
Vector< Scalar > & | acceptUnaryFunctor (const UF &functor, const Vector< Scalar > &other) |
Apply a unary functor to another vector, writing the results into this vector. The other vector is unchanged. | |
template<class VF > | |
Vector< Scalar > & | applyBinaryFunctor (const VF &functor, const Vector< Scalar > &other) |
Apply a binary functor to this vector and another vector, writing the results into this vector. The other vector is unchanged. | |
template<class VF > | |
Vector< Scalar > & | applyTernaryFunctor (const VF &functor, const Vector< Scalar > &x, const Vector< Scalar > &y) |
Apply a ternary functor to this vector and two other vectors, writing the results into this vector. The other vectors are unchanged. | |
template<class RF > | |
PlayaFunctors::VectorFunctorTraits < Scalar, RF >::ReturnType | applyUnaryReductionFunctor (const RF &functor) const |
Apply a unary reduction functor. | |
template<class RF > | |
PlayaFunctors::VectorFunctorTraits < Scalar, RF >::ReturnType | applyBinaryReductionFunctor (const RF &functor, const Vector< Scalar > &other) const |
Apply a binary reduction functor. | |
Static Public Member Functions | |
static RCP< Time > & | opTimer () |
Get a stopwtach for timing vector operations. | |
Protected Member Functions | |
const Vector< Scalar > & | getBlock (const std::deque< int > &iter) const |
Vector< Scalar > | getNonConstBlock (const std::deque< int > &iter) |
Related Functions | |
(Note that these are not member functions.) | |
template<class Scalar > | |
Vector< Scalar > | blockVector (const Vector< Scalar > &v1) |
template<class Scalar > | |
Vector< Scalar > | blockVector (const Vector< Scalar > &v1, const Vector< Scalar > &v2) |
template<class Scalar > | |
Vector< Scalar > | blockVector (const Vector< Scalar > &v1, const Vector< Scalar > &v2, const Vector< Scalar > &v3) |
template<class Scalar > | |
Vector< Scalar > | blockVector (const Vector< Scalar > &v1, const Vector< Scalar > &v2, const Vector< Scalar > &v3, const Vector< Scalar > &v4) |
template<class Scalar > | |
Vector< Scalar > | blockVector (const Array< Vector< Scalar > > &x) |
template<class Scalar > | |
LoadableVector< Scalar > * | loadable (Vector< Scalar > vec) |
Dynamic cast a Vector's underlying pointer to a LoadableVector. | |
template<class Scalar > | |
Scalar * | dataPtr (Vector< Scalar > vec) |
Return a pointer to the beginning of the vector's single data chunk. If the underlying VectorBase is not a SingleChunkVector an exception will be thrown. | |
template<class Scalar > | |
const Scalar * | dataPtr (const Vector< Scalar > &vec) |
Return a pointer to the beginning of the vector's single data chunk. If the underlying VectorBase is not a SingleChunkVector an exception will be thrown. | |
template<class Scalar > | |
Scalar | minloc (const Vector< Scalar > &x, int &gni) |
Return minimum element and its location. | |
template<class Scalar > | |
Scalar | maxloc (const Vector< Scalar > &x, int &gni) |
Return maximum element and its location. | |
template<class Scalar > | |
Scalar | minlocWithBound (const Scalar &lowerBound, const Vector< Scalar > &x, int &gni) |
Return minimum element greater than a specified bound, and its location. | |
template<class Scalar > | |
Scalar | maxlocWithBound (const Scalar &upperBound, const Vector< Scalar > &x, int &gni) |
Return maximum element less than a specified bound, and its location. | |
template<class Scalar > | |
Scalar | norm2 (const Vector< Scalar > &x) |
Compute the Euclidean norm of a vector. | |
template<class Scalar > | |
Scalar | norm1 (const Vector< Scalar > &x) |
Compute the one-norm of a vector. | |
template<class Scalar > | |
Scalar | normInf (const Vector< Scalar > &x) |
Compute the infinity norm of a vector. | |
template<class Scalar > | |
Scalar | norm2Dist (const Vector< Scalar > &x, const Vector< Scalar > &y) |
Compute the Euclidean distance between two vectors. | |
template<class Scalar > | |
Scalar | norm1Dist (const Vector< Scalar > &x, const Vector< Scalar > &y) |
Compute the one-norm distance between two vectors. | |
template<class Scalar > | |
Scalar | normInfDist (const Vector< Scalar > &x, const Vector< Scalar > &y) |
Compute the infinity-norm distance between two vectors. |
Ordinarily, you will never construct a Vector directly from a derived type. Rather, the createMember() method of VectorSpace is used to build a vector of the appropriate type, for example,
VectorType<double> vecType = new EpetraVectorType(); int dimension = 100; VectorSpace<double> space = vecType.createSpace(dimension); Vector<double> x = space.createMember(); Vector<double> y = space.createMember();
You will frequently create an empty vector to be filled in later, for example,
Vector<double> y;
Vector<double> x = space.createVector(); Vector<Scalar> y; y = x.copy();
Vector<Scalar> z = a*x + b*y;
Definition at line 63 of file PlayaVectorDecl.hpp.
Playa::Vector< Scalar >::Vector | ( | ) | [inline] |
Empty ctor
Playa::Vector< Scalar >::Vector | ( | Handleable< VectorBase< Scalar > > * | rawPtr | ) | [inline] |
Construct a Vector<Scalar> with a raw pointer to a VectorBase<Scalar>
Playa::Vector< Scalar >::Vector | ( | const RefCountPtr< VectorBase< Scalar > > & | smartPtr | ) | [inline] |
Construct a Vector<Scalar> with a smart pointer to a VectorBase<Scalar>
Playa::Vector< Scalar >::Vector | ( | const LCN< Scalar, N > & | x | ) | [inline] |
Construct a vector from an N-term LC.
Definition at line 38 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCN< Scalar, N >::eval(), and Playa::Handle< VectorBase< Scalar > >::ptr().
Vector< Scalar > Playa::Vector< Scalar >::abs | ( | ) | const [inline] |
Return element-by-element absolute value as a new vector.
Definition at line 647 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::acceptCopyOf(), Playa::Vector< Scalar >::selfAbs(), and Playa::Vector< Scalar >::space().
Vector< Scalar > & Playa::Vector< Scalar >::acceptCopyOf | ( | const Vector< Scalar > & | x | ) | [inline] |
Copy the values of another vector into this vector.
this = x
Definition at line 590 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::Handle< VectorBase< Scalar > >::ptr(), and Playa::Vector< Scalar >::space().
Referenced by Playa::Vector< Scalar >::abs(), NOX::NOXPlaya::Vector::abs(), Playa::SimpleIdentityOp< Scalar >::apply(), Playa::SimpleDiagonalOp< Scalar >::apply(), Playa::SimpleComposedOp< Scalar >::apply(), Playa::SimpleAddedOp< Scalar >::apply(), Playa::InverseOperator< Scalar >::apply(), Sundance::NLOp::computeFunctionValue(), Sundance::NLOp::computeJacobianAndFunction(), Playa::Vector< Scalar >::copy(), Playa::Vector< Scalar >::dotSlash(), Playa::Vector< Scalar >::dotStar(), Playa::BasicLMBFGSDirection::generateDirection(), Playa::Vector< Scalar >::reciprocal(), NOX::NOXPlaya::Vector::reciprocal(), Playa::NonlinearOperatorBase< double >::setEvalPt(), Playa::OptState::update(), and Sundance::updateDiscreteFunction().
Vector< Scalar > & Playa::Vector< Scalar >::acceptUnaryFunctor | ( | const UF & | functor, | |
const Vector< Scalar > & | other | |||
) | [inline] |
Apply a unary functor to another vector, writing the results into this vector. The other vector is unchanged.
Definition at line 341 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::Vector< Scalar >::getBlock(), Playa::Vector< Scalar >::getNonConstBlock(), Playa::Vector< Scalar >::hasMoreChunks(), Playa::Vector< Scalar >::nextChunk(), Playa::Vector< Scalar >::nextConstChunk(), Playa::Vector< Scalar >::numBlocks(), Playa::Vector< Scalar >::opTimer(), Playa::Vector< Scalar >::rewind(), Playa::NonConstDataChunk< Scalar >::size(), Playa::Vector< Scalar >::space(), Playa::ConstDataChunk< Scalar >::values(), and Playa::NonConstDataChunk< Scalar >::values().
Referenced by Playa::Vector< Scalar >::acceptCopyOf(), and Playa::Vector< Scalar >::acceptUnaryFunctor().
Vector< Scalar > & Playa::Vector< Scalar >::applyBinaryFunctor | ( | const VF & | functor, | |
const Vector< Scalar > & | other | |||
) | [inline] |
Apply a binary functor to this vector and another vector, writing the results into this vector. The other vector is unchanged.
Definition at line 385 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::getBlock(), Playa::Vector< Scalar >::getNonConstBlock(), Playa::Vector< Scalar >::hasMoreChunks(), Playa::Vector< Scalar >::nextChunk(), Playa::Vector< Scalar >::nextConstChunk(), Playa::Vector< Scalar >::numBlocks(), Playa::Vector< Scalar >::opTimer(), Playa::Vector< Scalar >::rewind(), Playa::NonConstDataChunk< Scalar >::size(), Playa::Vector< Scalar >::space(), Playa::ConstDataChunk< Scalar >::values(), and Playa::NonConstDataChunk< Scalar >::values().
Referenced by Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::selfDotSlash(), and Playa::Vector< Scalar >::selfDotStar().
PlayaFunctors::VectorFunctorTraits< Scalar, RF >::ReturnType Playa::Vector< Scalar >::applyBinaryReductionFunctor | ( | const RF & | functor, | |
const Vector< Scalar > & | other | |||
) | const [inline] |
Apply a binary reduction functor.
Definition at line 512 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::getBlock(), Playa::Vector< Scalar >::hasMoreChunks(), Playa::Vector< Scalar >::nextConstChunk(), Playa::Vector< Scalar >::opTimer(), Playa::Vector< Scalar >::rewind(), Playa::ConstDataChunk< Scalar >::size(), Playa::Vector< Scalar >::space(), and Playa::ConstDataChunk< Scalar >::values().
Referenced by Playa::norm1Dist(), Playa::Vector< Scalar >::norm2(), Playa::norm2Dist(), and Playa::normInfDist().
Vector< Scalar > & Playa::Vector< Scalar >::applyTernaryFunctor | ( | const VF & | functor, | |
const Vector< Scalar > & | x, | |||
const Vector< Scalar > & | y | |||
) | [inline] |
Apply a ternary functor to this vector and two other vectors, writing the results into this vector. The other vectors are unchanged.
Definition at line 428 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::getBlock(), Playa::Vector< Scalar >::getNonConstBlock(), Playa::Vector< Scalar >::hasMoreChunks(), Playa::Vector< Scalar >::nextChunk(), Playa::Vector< Scalar >::nextConstChunk(), Playa::Vector< Scalar >::numBlocks(), Playa::Vector< Scalar >::opTimer(), Playa::Vector< Scalar >::rewind(), Playa::NonConstDataChunk< Scalar >::size(), Playa::Vector< Scalar >::space(), Playa::ConstDataChunk< Scalar >::values(), and Playa::NonConstDataChunk< Scalar >::values().
Referenced by Playa::Vector< Scalar >::applyTernaryFunctor().
Vector< Scalar > & Playa::Vector< Scalar >::applyUnaryFunctor | ( | const UF & | functor | ) | [inline] |
Apply a unary functor, overwriting this vector with the results.
Definition at line 307 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryFunctor(), Playa::Vector< Scalar >::getNonConstBlock(), Playa::Vector< Scalar >::hasMoreChunks(), Playa::Vector< Scalar >::nextChunk(), Playa::Vector< Scalar >::numBlocks(), Playa::Vector< Scalar >::opTimer(), Playa::Vector< Scalar >::rewind(), Playa::NonConstDataChunk< Scalar >::size(), and Playa::NonConstDataChunk< Scalar >::values().
Referenced by Playa::Vector< Scalar >::applyUnaryFunctor(), Playa::Vector< Scalar >::randomize(), Playa::Vector< Scalar >::scale(), Playa::Vector< Scalar >::selfAbs(), Playa::Vector< Scalar >::selfReciprocal(), and Playa::Vector< Scalar >::setToConstant().
PlayaFunctors::VectorFunctorTraits< Scalar, RF >::ReturnType Playa::Vector< Scalar >::applyUnaryReductionFunctor | ( | const RF & | functor | ) | const [inline] |
Apply a unary reduction functor.
Definition at line 482 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::getBlock(), Playa::Vector< Scalar >::hasMoreChunks(), Playa::Vector< Scalar >::nextConstChunk(), Playa::Vector< Scalar >::opTimer(), Playa::Vector< Scalar >::rewind(), Playa::ConstDataChunk< Scalar >::size(), Playa::Vector< Scalar >::space(), and Playa::ConstDataChunk< Scalar >::values().
Referenced by Playa::Vector< Scalar >::max(), Playa::maxlocWithBound(), Playa::Vector< Scalar >::min(), Playa::minlocWithBound(), Playa::Vector< Scalar >::norm1(), and Playa::Vector< Scalar >::normInf().
const MPIComm& Playa::Vector< Scalar >::comm | ( | ) | const [inline] |
My communicator.
Definition at line 132 of file PlayaVectorDecl.hpp.
Referenced by Playa::Vector< Scalar >::max(), Playa::maxlocWithBound(), Playa::Vector< Scalar >::min(), Playa::minlocWithBound(), Playa::Vector< Scalar >::norm1(), Playa::norm1Dist(), Playa::Vector< Scalar >::norm2(), Playa::norm2Dist(), Playa::Vector< Scalar >::normInf(), Playa::normInfDist(), and Playa::Vector< Scalar >::print().
Vector< Scalar > Playa::Vector< Scalar >::copy | ( | ) | const [inline] |
Create a new vector that is a copy of this vector.
Definition at line 600 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::acceptCopyOf(), and Playa::Vector< Scalar >::space().
Referenced by Playa::SimpleComposedOp< Scalar >::apply(), Playa::SimpleAddedOp< Scalar >::apply(), Sundance::copyDiscreteFunction(), Playa::denseSolve(), Sundance::PDEConstrainedObjBase::evalGrad(), Playa::ObjectiveBase::fdCheck(), Sundance::FunctionalEvaluator::fdGradientCheck(), Playa::BasicLMBFGSDirection::generateDirection(), Playa::Vector< Scalar >::operator=(), NOX::NOXPlaya::Vector::operator=(), Playa::LineSearchBasedOptBase::run(), Playa::LinearCombinationTester< Scalar >::selfModifyingOpTests(), Sundance::StochBlockJacobiSolver::solve(), Playa::NewtonArmijoSolver< Scalar >::solve(), Playa::BelosSolver::solve(), Playa::AztecSolver::solve(), Playa::AmesosSolver::solve(), Playa::BICGSTABSolver< Scalar >::solveUnprec(), Sundance::NLOp::updateDiscreteFunctionValue(), and NOX::NOXPlaya::Vector::Vector().
std::string Playa::Vector< Scalar >::description | ( | ) | const [inline] |
Return a short string description of the vector.
Reimplemented from Playa::Handle< VectorBase< Scalar > >.
Definition at line 290 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::dim(), Playa::Handle< VectorBase< Scalar > >::ptr(), and Teuchos::toString().
Referenced by Playa::LinearOperator< Scalar >::apply(), Playa::LinearOperator< Scalar >::applyTranspose(), Playa::operator<<(), and Playa::Vector< Scalar >::print().
int Playa::Vector< Scalar >::dim | ( | ) | const [inline] |
My dimension.
Definition at line 136 of file PlayaVectorDecl.hpp.
Referenced by Playa::Vector< Scalar >::description().
Scalar Playa::Vector< Scalar >::dot | ( | const Vector< Scalar > & | other | ) | const [inline] |
Take dot product with another vector.
Definition at line 703 of file PlayaVectorImpl.hpp.
References PLAYA_CHECK_SPACES, Playa::Handle< VectorBase< Scalar > >::ptr(), and Playa::Vector< Scalar >::space().
Referenced by Playa::MultiVectorOperator< Scalar >::apply(), NOX::NOXPlaya::Vector::dot(), and Playa::BICGSTABSolver< Scalar >::solveUnprec().
Vector< Scalar > Playa::Vector< Scalar >::dotSlash | ( | const Vector< Scalar > & | other | ) | const [inline] |
Element-by-element division (Matlab dot-slash operator).
Definition at line 636 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::acceptCopyOf(), Playa::Vector< Scalar >::selfDotSlash(), and Playa::Vector< Scalar >::space().
Referenced by Playa::VectorTester< Scalar >::dotSlashTest().
Vector< Scalar > Playa::Vector< Scalar >::dotStar | ( | const Vector< Scalar > & | other | ) | const [inline] |
Element-by-element product (Matlab dot-star operator).
Definition at line 626 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::acceptCopyOf(), Playa::Vector< Scalar >::selfDotStar(), and Playa::Vector< Scalar >::space().
Referenced by Playa::SimpleDiagonalOp< Scalar >::apply(), and Playa::VectorTester< Scalar >::dotStarTest().
const Vector< Scalar > & Playa::Vector< Scalar >::getBlock | ( | const std::deque< int > & | iter | ) | const [inline, protected] |
get a subblock as specified by a deque of indices
Definition at line 153 of file PlayaVectorImpl.hpp.
const Vector< Scalar > & Playa::Vector< Scalar >::getBlock | ( | const BlockIterator< Scalar > & | b | ) | const [inline] |
get the i-th block
Definition at line 126 of file PlayaVectorImpl.hpp.
References Playa::BlockIterator< Scalar >::atEnd(), and Playa::BlockIterator< Scalar >::blockIndex().
const Vector< Scalar > & Playa::Vector< Scalar >::getBlock | ( | int | i | ) | const [inline] |
get the i-th block
Definition at line 98 of file PlayaVectorImpl.hpp.
References Playa::BlockVectorBase< Scalar >::getBlock(), Playa::Vector< Scalar >::numBlocks(), and Playa::Handle< VectorBase< Scalar > >::ptr().
Referenced by Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::SimpleBlockOp< Scalar >::apply(), Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::applyBinaryReductionFunctor(), Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::applyUnaryReductionFunctor(), Sundance::FunctionalEvaluator::evalGradient(), Playa::Vector< Scalar >::operator()(), Playa::Vector< Scalar >::print(), Sundance::setDiscreteFunctionVector(), and Playa::BlockTriangularSolver< Scalar >::solve().
Vector< Scalar > Playa::Vector< Scalar >::getNonConstBlock | ( | const std::deque< int > & | iter | ) | [inline, protected] |
get a non-const subblock as specified by a deque of indices
Definition at line 173 of file PlayaVectorImpl.hpp.
Vector< Scalar > Playa::Vector< Scalar >::getNonConstBlock | ( | const BlockIterator< Scalar > & | b | ) | [inline] |
get the i-th block
Definition at line 140 of file PlayaVectorImpl.hpp.
References Playa::BlockIterator< Scalar >::atEnd(), and Playa::BlockIterator< Scalar >::blockIndex().
Vector< Scalar > Playa::Vector< Scalar >::getNonConstBlock | ( | int | i | ) | [inline] |
get the i-th block
Definition at line 111 of file PlayaVectorImpl.hpp.
References Playa::BlockVectorBase< Scalar >::getNonConstBlock(), Playa::Vector< Scalar >::numBlocks(), and Playa::Handle< VectorBase< Scalar > >::ptr().
Referenced by Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::SimpleBlockOp< Scalar >::apply(), Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::applyUnaryFunctor(), and Playa::Vector< Scalar >::operator()().
bool Playa::Vector< Scalar >::hasMoreChunks | ( | ) | const [inline] |
Tell whether there are more chunks remaining to be accessed.
Definition at line 207 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr().
Referenced by Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::applyBinaryReductionFunctor(), Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::applyUnaryFunctor(), Playa::Vector< Scalar >::applyUnaryReductionFunctor(), Playa::Vector< Scalar >::operator[](), and Playa::Vector< Scalar >::print().
Scalar Playa::Vector< Scalar >::max | ( | ) | const [inline] |
Return the max element.
Definition at line 782 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryReductionFunctor(), and Playa::Vector< Scalar >::comm().
Referenced by Sundance::ThresholdEventDetector::checkForEvent().
Scalar Playa::Vector< Scalar >::min | ( | ) | const [inline] |
Return the min element.
Definition at line 790 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryReductionFunctor(), and Playa::Vector< Scalar >::comm().
Referenced by Sundance::ThresholdEventDetector::checkForEvent().
NonConstDataChunk< Scalar > Playa::Vector< Scalar >::nextChunk | ( | ) | [inline] |
Get the next chunk of values for read-write access.
Definition at line 199 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr().
Referenced by Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::applyUnaryFunctor(), and Playa::Vector< Scalar >::operator[]().
ConstDataChunk< Scalar > Playa::Vector< Scalar >::nextConstChunk | ( | ) | const [inline] |
Get the next chunk of values for read-only access.
Definition at line 192 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr().
Referenced by Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::applyBinaryReductionFunctor(), Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::applyUnaryReductionFunctor(), Playa::Vector< Scalar >::operator[](), and Playa::Vector< Scalar >::print().
Scalar Playa::Vector< Scalar >::norm1 | ( | ) | const [inline] |
Compute the 1-norm of this vector.
Definition at line 723 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryReductionFunctor(), and Playa::Vector< Scalar >::comm().
Referenced by NOX::NOXPlaya::Vector::norm(), and Playa::Vector< Scalar >::norm1().
Scalar Playa::Vector< Scalar >::norm2 | ( | const Vector< Scalar > & | weights | ) | const [inline] |
Compute the weighted 2-norm of this vector.
Definition at line 743 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyBinaryReductionFunctor(), and Playa::Vector< Scalar >::comm().
Scalar Playa::Vector< Scalar >::norm2 | ( | ) | const [inline] |
Compute the 2-norm of this vector.
Definition at line 733 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr().
Referenced by Sundance::PDEConstrainedObjBase::evalGrad(), NOX::NOXPlaya::Vector::norm(), Playa::Vector< Scalar >::norm2(), Playa::LineSearchBasedOptBase::run(), Playa::LinearCombinationTester< Scalar >::selfModifyingOpTests(), Playa::NewtonArmijoSolver< Scalar >::solve(), Playa::BelosSolver::solve(), Sundance::NonlinearPDEConstrainedObj::solveState(), Sundance::LinearPDEConstrainedObj::solveState(), Sundance::NonlinearPDEConstrainedObj::solveStateAndAdjoint(), Sundance::LinearPDEConstrainedObj::solveStateAndAdjoint(), and Playa::BICGSTABSolver< Scalar >::solveUnprec().
Scalar Playa::Vector< Scalar >::normInf | ( | ) | const [inline] |
Compute the infinity-norm of this vector.
Definition at line 754 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryReductionFunctor(), and Playa::Vector< Scalar >::comm().
Referenced by NOX::NOXPlaya::Vector::norm(), Playa::Vector< Scalar >::normInf(), and Playa::DefaultOptConvergenceTest::test().
int Playa::Vector< Scalar >::numBlocks | ( | ) | const [inline] |
get number of blocks
Definition at line 78 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr().
Referenced by Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::applyUnaryFunctor(), Playa::Vector< Scalar >::getBlock(), Playa::Vector< Scalar >::getNonConstBlock(), and Playa::Vector< Scalar >::print().
Scalar & Playa::Vector< Scalar >::operator() | ( | const BlockIterator< Scalar > & | b, | |
int | localIndexWithinBlock | |||
) | [inline] |
parentheses operator for read-write random access to local elements as specified by a block iterator and a flat index indicating the element's location within that block.
Definition at line 885 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::getNonConstBlock().
const Scalar & Playa::Vector< Scalar >::operator() | ( | const BlockIterator< Scalar > & | b, | |
int | localIndexWithinBlock | |||
) | const [inline] |
parentheses operator for read-only random access to local elements as specified by a block iterator and a flat index indicating the element's location within that block.
Definition at line 875 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::getBlock().
Scalar Playa::Vector< Scalar >::operator* | ( | const Vector< Scalar > & | other | ) | const [inline] |
Overloaded operator for dot product.
Definition at line 712 of file PlayaVectorImpl.hpp.
References PLAYA_CHECK_SPACES, Playa::Handle< VectorBase< Scalar > >::ptr(), and Playa::Vector< Scalar >::space().
Vector< Scalar > & Playa::Vector< Scalar >::operator*= | ( | const Scalar & | a | ) | [inline] |
Scale by a constant
Definition at line 63 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::scale().
Vector< Scalar > & Playa::Vector< Scalar >::operator+= | ( | const LCN< Scalar, N > & | x | ) | [inline] |
Add an N-term LC into this vector
Definition at line 213 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCN< Scalar, N >::eval().
Vector< Scalar > & Playa::Vector< Scalar >::operator+= | ( | const LCN< Scalar, 2 > & | x | ) | [inline] |
Add a two-term LC into this vector
Definition at line 192 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCNBase< Scalar, N >::coeff(), Playa::Vector< Scalar >::space(), Playa::Vector< Scalar >::update(), and Playa::LCNBase< Scalar, N >::vec().
Vector< Scalar > & Playa::Vector< Scalar >::operator+= | ( | const LCN< Scalar, 1 > & | x | ) | [inline] |
Add a one-term LC into this vector
Definition at line 174 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCNBase< Scalar, N >::coeff(), Playa::Handle< VectorBase< Scalar > >::ptr(), Playa::Vector< Scalar >::space(), and Playa::LCNBase< Scalar, N >::vec().
Vector< Scalar > & Playa::Vector< Scalar >::operator+= | ( | const Vector< Scalar > & | other | ) | [inline] |
Add a vector into this vector
Definition at line 46 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::update().
Vector< Scalar > & Playa::Vector< Scalar >::operator-= | ( | const LCN< Scalar, N > & | x | ) | [inline] |
Subtract an N-term LC from this vector
Definition at line 269 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCN< Scalar, N >::eval().
Vector< Scalar > & Playa::Vector< Scalar >::operator-= | ( | const LCN< Scalar, 2 > & | x | ) | [inline] |
Subtract a two-term LC from this vector
Definition at line 247 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCNBase< Scalar, N >::coeff(), Playa::Vector< Scalar >::space(), Playa::Vector< Scalar >::update(), and Playa::LCNBase< Scalar, N >::vec().
Vector< Scalar > & Playa::Vector< Scalar >::operator-= | ( | const LCN< Scalar, 1 > & | x | ) | [inline] |
Subtract a one-term LC from this vector
Definition at line 229 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCNBase< Scalar, N >::coeff(), Playa::Handle< VectorBase< Scalar > >::ptr(), Playa::Vector< Scalar >::space(), and Playa::LCNBase< Scalar, N >::vec().
Vector< Scalar > & Playa::Vector< Scalar >::operator-= | ( | const Vector< Scalar > & | other | ) | [inline] |
Subtract a vector from this vector
Definition at line 55 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::update().
Vector< Scalar > & Playa::Vector< Scalar >::operator/= | ( | const Scalar & | a | ) | [inline] |
Divide by a constant
Definition at line 70 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::scale().
Vector< Scalar > & Playa::Vector< Scalar >::operator= | ( | const LCN< Scalar, N > & | x | ) | [inline] |
Assign an N-term LC to this vector.
Definition at line 158 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCN< Scalar, N >::eval(), Playa::Handle< PointerType >::ptr(), and Playa::Handle< VectorBase< Scalar > >::ptr().
Vector< Scalar > & Playa::Vector< Scalar >::operator= | ( | const LCN< Scalar, 3 > & | x | ) | [inline] |
Assign a three-term LC to this vector.
Definition at line 117 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCNBase< Scalar, N >::coeff(), Playa::LCN< Scalar, 3 >::eval(), Playa::Handle< PointerType >::ptr(), Playa::Handle< VectorBase< Scalar > >::ptr(), Playa::Vector< Scalar >::space(), Playa::Vector< Scalar >::update(), Playa::LCNBase< Scalar, N >::vec(), and Playa::Vector< Scalar >::zero().
Vector< Scalar > & Playa::Vector< Scalar >::operator= | ( | const LCN< Scalar, 2 > & | x | ) | [inline] |
Assign a two-term LC to this vector.
Definition at line 83 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCNBase< Scalar, N >::coeff(), Playa::LCN< Scalar, 2 >::eval(), Playa::Handle< VectorBase< Scalar > >::ptr(), Playa::Vector< Scalar >::space(), Playa::Vector< Scalar >::update(), Playa::LCNBase< Scalar, N >::vec(), and Playa::Vector< Scalar >::zero().
Vector< Scalar > & Playa::Vector< Scalar >::operator= | ( | const LCN< Scalar, 1 > & | x | ) | [inline] |
Assign a one-term LC to this vector.
Definition at line 49 of file PlayaLinearCombinationImpl.hpp.
References Playa::LCNBase< Scalar, N >::coeff(), Playa::Vector< Scalar >::copy(), Playa::Handle< VectorBase< Scalar > >::ptr(), Playa::Vector< Scalar >::scale(), Playa::Vector< Scalar >::space(), Playa::LCNBase< Scalar, N >::vec(), and Playa::Vector< Scalar >::zero().
Scalar & Playa::Vector< Scalar >::operator[] | ( | int | localIndex | ) | [inline] |
non-const bracket operator for read-write random access to local elements as specified by a flat index that runs from 0 to space().numLocalElements(). If the vector does not consist of a single contiguous data chunk, this might be slow (worst case would be O(N), if every element is stored in its own chunk of length 1).
Definition at line 837 of file PlayaVectorImpl.hpp.
References Playa::SingleChunkVector< Scalar >::chunkSize(), Playa::SingleChunkVector< Scalar >::dataPtr(), Playa::Vector< Scalar >::hasMoreChunks(), Playa::Vector< Scalar >::nextChunk(), Playa::Debug::on, PLAYA_BOUNDSCHECK, Playa::Handle< VectorBase< Scalar > >::ptr(), Playa::NonConstDataChunk< Scalar >::size(), and Playa::NonConstDataChunk< Scalar >::values().
const Scalar & Playa::Vector< Scalar >::operator[] | ( | int | localIndex | ) | const [inline] |
const bracket operator for read-only random access to local elements as specified by a flat index that runs from 0 to space().numLocalElements(). If the vector does not consist of a single contiguous data chunk, this might be slow (worst case would be O(N), if every element is stored in its own chunk of length 1).
Definition at line 799 of file PlayaVectorImpl.hpp.
References Playa::SingleChunkVector< Scalar >::chunkSize(), Playa::SingleChunkVector< Scalar >::dataPtr(), Playa::Vector< Scalar >::hasMoreChunks(), Playa::Vector< Scalar >::nextConstChunk(), Playa::Debug::on, PLAYA_BOUNDSCHECK, Playa::Handle< VectorBase< Scalar > >::ptr(), Playa::ConstDataChunk< Scalar >::size(), and Playa::ConstDataChunk< Scalar >::values().
static RCP<Time>& Playa::Vector< Scalar >::opTimer | ( | ) | [inline, static] |
Get a stopwtach for timing vector operations.
Definition at line 375 of file PlayaVectorDecl.hpp.
Referenced by Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::applyBinaryReductionFunctor(), Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::applyUnaryFunctor(), and Playa::Vector< Scalar >::applyUnaryReductionFunctor().
void Playa::Vector< Scalar >::print | ( | std::ostream & | os | ) | const [inline] |
Print the vector in some detail.
Reimplemented from Playa::Handle< VectorBase< Scalar > >.
Definition at line 224 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::comm(), Playa::Vector< Scalar >::description(), Playa::Vector< Scalar >::getBlock(), Playa::MPIComm::getNProc(), Playa::MPIComm::getRank(), Playa::Vector< Scalar >::hasMoreChunks(), Playa::Vector< Scalar >::nextConstChunk(), Playa::Vector< Scalar >::numBlocks(), Playa::Printable::print(), Playa::Handle< VectorBase< Scalar > >::ptr(), Playa::Vector< Scalar >::rewind(), Playa::ConstDataChunk< Scalar >::size(), Playa::Vector< Scalar >::space(), Playa::MPIComm::synchronize(), and Playa::ConstDataChunk< Scalar >::values().
Referenced by NOX::NOXPlaya::Group::applyJacobianInverse(), Playa::NonlinearOperatorBase< double >::getFunctionValue(), NOX::NOXPlaya::Vector::leftshift(), and Playa::NonlinearOperatorBase< double >::setEvalPt().
Vector< Scalar > & Playa::Vector< Scalar >::randomize | ( | ) | [inline] |
Overwrite self with random values.
Definition at line 572 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryFunctor().
Referenced by Playa::TesterBase< Scalar >::randomizeVec().
Vector< Scalar > Playa::Vector< Scalar >::reciprocal | ( | ) | const [inline] |
Return element-by-element reciprocal as a new vector.
Definition at line 661 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::acceptCopyOf(), Playa::Vector< Scalar >::selfReciprocal(), and Playa::Vector< Scalar >::space().
void Playa::Vector< Scalar >::rewind | ( | ) | const [inline] |
Reset the data stream back to a state where all chunks are considered unread.
Definition at line 214 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr().
Referenced by Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::applyBinaryReductionFunctor(), Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::applyUnaryFunctor(), Playa::Vector< Scalar >::applyUnaryReductionFunctor(), and Playa::Vector< Scalar >::print().
Vector< Scalar > & Playa::Vector< Scalar >::scale | ( | const Scalar & | alpha | ) | [inline] |
Multiply this vector by a constant scalar factor.
this = alpha * this;
Definition at line 549 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryFunctor().
Referenced by Playa::SimpleScaledOp< Scalar >::apply(), Playa::LCN< Scalar, 3 >::eval(), Playa::LCN< Scalar, 2 >::eval(), Playa::LCN< Scalar, 1 >::eval(), Playa::LCN< Scalar, N >::eval(), Playa::operator*(), Playa::Vector< Scalar >::operator*=(), Playa::Vector< Scalar >::operator/=(), Playa::Vector< Scalar >::operator=(), and NOX::NOXPlaya::Vector::scale().
Vector< Scalar > & Playa::Vector< Scalar >::selfAbs | ( | ) | [inline] |
Overwrite self with element-by-element absolute value.
Definition at line 564 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryFunctor().
Referenced by Playa::Vector< Scalar >::abs(), and NOX::NOXPlaya::Vector::abs().
Vector< Scalar > & Playa::Vector< Scalar >::selfDotSlash | ( | const Vector< Scalar > & | other | ) | [inline] |
In-place element-by-element division (Matlab dot-slash operator).
Definition at line 618 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyBinaryFunctor().
Referenced by Playa::Vector< Scalar >::dotSlash().
Vector< Scalar > & Playa::Vector< Scalar >::selfDotStar | ( | const Vector< Scalar > & | other | ) | [inline] |
In-place element-by-element product (Matlab dot-star operator).
Definition at line 611 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyBinaryFunctor().
Referenced by Playa::Vector< Scalar >::dotStar(), and NOX::NOXPlaya::Vector::scale().
Vector< Scalar > & Playa::Vector< Scalar >::selfReciprocal | ( | ) | [inline] |
Overwrite self with element-by-element reciprocal.
Definition at line 556 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryFunctor().
Referenced by Playa::Vector< Scalar >::reciprocal(), and NOX::NOXPlaya::Vector::reciprocal().
void Playa::Vector< Scalar >::setBlock | ( | int | i, | |
const Vector< Scalar > & | v | |||
) | [inline] |
set the i-th block
Definition at line 86 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr(), and Playa::BlockVectorBase< Scalar >::setBlock().
Referenced by Playa::BlockTriangularSolver< Scalar >::solve().
void Playa::Vector< Scalar >::setToConstant | ( | const Scalar & | alpha | ) | [inline] |
Set all elements to a constant value.
Definition at line 774 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::applyUnaryFunctor().
Referenced by Playa::VectorSpace< Scalar >::createMember(), Sundance::DiscreteFunctionData::DiscreteFunctionData(), Playa::PoissonBoltzmannOp::getInitialGuess(), NOX::NOXPlaya::Vector::init(), Sundance::LinearEigenproblem::lumpedOperator(), Anasazi::MultiVecTraits< double, SimpleMV >::MvTimesMatAddMv(), and Playa::Vector< Scalar >::zero().
VectorSpace<Scalar> Playa::Vector< Scalar >::space | ( | ) | const [inline] |
My space.
Definition at line 128 of file PlayaVectorDecl.hpp.
Referenced by Playa::Vector< Scalar >::abs(), Playa::Vector< Scalar >::acceptCopyOf(), Playa::Vector< Scalar >::acceptUnaryFunctor(), Playa::InverseOperator< Scalar >::apply(), Playa::Vector< Scalar >::applyBinaryFunctor(), Playa::Vector< Scalar >::applyBinaryReductionFunctor(), Playa::Vector< Scalar >::applyTernaryFunctor(), Playa::Vector< Scalar >::applyUnaryReductionFunctor(), Playa::Vector< double >::comm(), Playa::VectorSpace< Scalar >::contains(), Playa::Vector< Scalar >::copy(), Playa::Vector< Scalar >::dot(), Playa::Vector< Scalar >::dotSlash(), Playa::Vector< Scalar >::dotStar(), Playa::ObjectiveBase::fdCheck(), Sundance::FunctionalEvaluator::fdGradientCheck(), NOX::NOXPlaya::Vector::length(), Playa::makeEpetraDiagonalMatrix(), Playa::maxlocWithBound(), Playa::minlocWithBound(), Playa::Vector< Scalar >::operator*(), Playa::Vector< Scalar >::operator+=(), Playa::Vector< Scalar >::operator-=(), Playa::Vector< Scalar >::operator=(), Playa::Vector< Scalar >::print(), Playa::Vector< Scalar >::reciprocal(), Playa::LineSearchBasedOptBase::run(), Playa::DefaultBlockVector< Scalar >::setBlock(), Playa::KrylovSolver< Scalar >::solve(), Playa::BlockTriangularSolver< Scalar >::solve(), and Playa::BICGSTABSolver< Scalar >::solveUnprec().
Vector< Scalar > & Playa::Vector< Scalar >::update | ( | const Scalar & | alpha, | |
const Vector< Scalar > & | x, | |||
const Scalar & | beta, | |||
const Vector< Scalar > & | y, | |||
const Scalar & | gamma, | |||
const Vector< Scalar > & | z, | |||
const Scalar & | delta | |||
) | [inline] |
Add three scaled vectors to this vector times a constant: .
Definition at line 686 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr().
Vector< Scalar > & Playa::Vector< Scalar >::update | ( | const Scalar & | alpha, | |
const Vector< Scalar > & | x, | |||
const Scalar & | beta, | |||
const Vector< Scalar > & | y, | |||
const Scalar & | gamma | |||
) | [inline] |
Add two scaled vectors to this vector times a constant: .
Definition at line 673 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr().
Vector< Scalar > & Playa::Vector< Scalar >::update | ( | const Scalar & | alpha, | |
const Vector< Scalar > & | x, | |||
const Scalar & | gamma = 1.0 | |||
) | [inline] |
Add a scaled vector to this vector times a constant: .
Definition at line 580 of file PlayaVectorImpl.hpp.
References Playa::Handle< VectorBase< Scalar > >::ptr().
Referenced by Sundance::addVecToDiscreteFunction(), Playa::MultiVectorOperator< Scalar >::apply(), Playa::Vector< Scalar >::operator+=(), Playa::Vector< Scalar >::operator-=(), Playa::Vector< Scalar >::operator=(), and NOX::NOXPlaya::Vector::update().
void Playa::Vector< Scalar >::zero | ( | ) | [inline] |
Set all elements to zero.
Definition at line 764 of file PlayaVectorImpl.hpp.
References Playa::Vector< Scalar >::setToConstant().
Referenced by Playa::SimpleZeroOp< Scalar >::apply(), Playa::SimpleBlockOp< Scalar >::apply(), Playa::SimpleAddedOp< Scalar >::apply(), Playa::MultiVectorOperator< Scalar >::apply(), Sundance::PDEConstrainedObjBase::eval(), Playa::Vector< Scalar >::operator=(), Sundance::StochBlockJacobiSolver::solve(), Playa::BelosSolver::solve(), Playa::BICGSTABSolver< Scalar >::solveUnprec(), Playa::VectorTester< Scalar >::sumTest(), and Sundance::VectorFillingAssemblyKernel::VectorFillingAssemblyKernel().
Vector< Scalar > blockVector | ( | const Array< Vector< Scalar > > & | x | ) | [related] |
Definition at line 136 of file PlayaDefaultBlockVectorImpl.hpp.
Vector< Scalar > blockVector | ( | const Vector< Scalar > & | v1, | |
const Vector< Scalar > & | v2, | |||
const Vector< Scalar > & | v3, | |||
const Vector< Scalar > & | v4 | |||
) | [related] |
Definition at line 120 of file PlayaDefaultBlockVectorImpl.hpp.
Vector< Scalar > blockVector | ( | const Vector< Scalar > & | v1, | |
const Vector< Scalar > & | v2, | |||
const Vector< Scalar > & | v3 | |||
) | [related] |
Definition at line 106 of file PlayaDefaultBlockVectorImpl.hpp.
Vector< Scalar > blockVector | ( | const Vector< Scalar > & | v1, | |
const Vector< Scalar > & | v2 | |||
) | [related] |
Definition at line 94 of file PlayaDefaultBlockVectorImpl.hpp.
Definition at line 83 of file PlayaDefaultBlockVectorImpl.hpp.
const Scalar * dataPtr | ( | const Vector< Scalar > & | vec | ) | [related] |
Return a pointer to the beginning of the vector's single data chunk. If the underlying VectorBase is not a SingleChunkVector an exception will be thrown.
Definition at line 907 of file PlayaVectorImpl.hpp.
Scalar * dataPtr | ( | Vector< Scalar > | vec | ) | [related] |
Return a pointer to the beginning of the vector's single data chunk. If the underlying VectorBase is not a SingleChunkVector an exception will be thrown.
Definition at line 895 of file PlayaVectorImpl.hpp.
LoadableVector< Scalar > * loadable | ( | Vector< Scalar > | vec | ) | [related] |
Dynamic cast a Vector's underlying pointer to a LoadableVector.
Definition at line 918 of file PlayaVectorImpl.hpp.
Scalar maxloc | ( | const Vector< Scalar > & | x, | |
int & | gni | |||
) | [related] |
Scalar maxlocWithBound | ( | const Scalar & | upperBound, | |
const Vector< Scalar > & | x, | |||
int & | gni | |||
) | [related] |
Return maximum element less than a specified bound, and its location.
Definition at line 59 of file PlayaVectorOpsImpl.hpp.
Scalar minloc | ( | const Vector< Scalar > & | x, | |
int & | gni | |||
) | [related] |
Scalar minlocWithBound | ( | const Scalar & | lowerBound, | |
const Vector< Scalar > & | x, | |||
int & | gni | |||
) | [related] |
Return minimum element greater than a specified bound, and its location.
Definition at line 48 of file PlayaVectorOpsImpl.hpp.
Scalar norm1 | ( | const Vector< Scalar > & | x | ) | [related] |
Compute the one-norm of a vector.
Definition at line 99 of file PlayaVectorOpsImpl.hpp.
References Playa::Vector< Scalar >::norm1().
Scalar norm1Dist | ( | const Vector< Scalar > & | x, | |
const Vector< Scalar > & | y | |||
) | [related] |
Compute the one-norm distance between two vectors.
Definition at line 79 of file PlayaVectorOpsImpl.hpp.
Scalar norm2 | ( | const Vector< Scalar > & | x | ) | [related] |
Compute the Euclidean norm of a vector.
Definition at line 95 of file PlayaVectorOpsImpl.hpp.
References Playa::Vector< Scalar >::norm2().
Scalar norm2Dist | ( | const Vector< Scalar > & | x, | |
const Vector< Scalar > & | y | |||
) | [related] |
Compute the Euclidean distance between two vectors.
Definition at line 71 of file PlayaVectorOpsImpl.hpp.
Scalar normInf | ( | const Vector< Scalar > & | x | ) | [related] |
Compute the infinity norm of a vector.
Definition at line 103 of file PlayaVectorOpsImpl.hpp.
References Playa::Vector< Scalar >::normInf().
Scalar normInfDist | ( | const Vector< Scalar > & | x, | |
const Vector< Scalar > & | y | |||
) | [related] |
Compute the infinity-norm distance between two vectors.
Definition at line 87 of file PlayaVectorOpsImpl.hpp.