#include <NOX_LAPACK_Vector.H>
Inheritance diagram for NOX::LAPACK::Vector:
Public Member Functions | |
| Vector () | |
| Construct an empty vector. | |
| Vector (int n) | |
| Construct a zero vector of length n. | |
| Vector (int n, double *v) | |
| Construct a vector of length n from given array. | |
| Vector (const NOX::LAPACK::Vector &source, NOX::CopyType type=NOX::DeepCopy) | |
| Copy constructor. | |
| ~Vector () | |
| Destruct Vector. | |
| int | length () const |
| Return the length of vector. | |
| double & | operator() (int i) |
| Return the i-th element. | |
| const double & | operator() (int i) const |
| Return the i-th element (const version). | |
| ostream & | leftshift (ostream &stream) const |
| Prints out the vector to the specified stream. | |
| void | print () const |
| Print the vector. This is meant for debugging purposes only and does not need to be defined. | |
Initialization methods. | |
| NOX::Abstract::Vector & | init (double value) |
Initialize every element of this vector with gamma. | |
| virtual NOX::Abstract::Vector & | random (bool useSeed=false, int seed=1) |
| Initialize every element of this vector with random values. | |
| NOX::Abstract::Vector & | operator= (const vector< double > &y) |
| Replace this vector with STL double vector y. | |
| NOX::Abstract::Vector & | operator= (const NOX::LAPACK::Vector &y) |
| NOX::Abstract::Vector & | operator= (const NOX::Abstract::Vector &y) |
Copy source vector y into this vector. | |
| NOX::Abstract::Vector & | abs (const NOX::LAPACK::Vector &y) |
| NOX::Abstract::Vector & | abs (const NOX::Abstract::Vector &y) |
Put element-wise absolute values of source vector y into this vector. | |
| NOX::Abstract::Vector & | reciprocal (const NOX::LAPACK::Vector &y) |
| NOX::Abstract::Vector & | reciprocal (const NOX::Abstract::Vector &y) |
Put element-wise reciprocal of source vector y into this vector. | |
Update methods. | |
| NOX::Abstract::Vector & | scale (double gamma) |
Scale each element of this vector by gamma. | |
| NOX::Abstract::Vector & | scale (const NOX::LAPACK::Vector &a) |
| NOX::Abstract::Vector & | scale (const NOX::Abstract::Vector &a) |
| Scale this vector element-by-element by the vector a. | |
| NOX::Abstract::Vector & | update (double alpha, const NOX::LAPACK::Vector &a, double gamma=0.0) |
| NOX::Abstract::Vector & | update (double alpha, const NOX::Abstract::Vector &a, double gamma=0.0) |
| Compute x = (alpha * a) + (gamma * x) where x is this vector. | |
| NOX::Abstract::Vector & | update (double alpha, const NOX::LAPACK::Vector &a, double beta, const NOX::LAPACK::Vector &b, double gamma=0.0) |
| NOX::Abstract::Vector & | update (double alpha, const NOX::Abstract::Vector &a, double beta, const NOX::Abstract::Vector &b, double gamma=0.0) |
| Compute x = (alpha * a) + (beta * b) + (gamma * x) where x is this vector. | |
Creating new Vectors. | |
| NOX::Abstract::Vector * | clone (NOX::CopyType type=NOX::DeepCopy) const |
| Create a new Vector of the same underlying type by cloning "this", and return a pointer to the new vector. | |
Norms. | |
| double | norm (NOX::Abstract::Vector::NormType type=NOX::Abstract::Vector::TwoNorm) const |
| Norm. | |
| double | norm (const NOX::LAPACK::Vector &weights) const |
| double | norm (const NOX::Abstract::Vector &weights) const |
| Weighted 2-Norm. | |
Dot products | |
| double | dot (const NOX::LAPACK::Vector &y) const |
| double | dot (const NOX::Abstract::Vector &y) const |
Dot product with y. | |
|
|
Put element-wise absolute values of source vector Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
|
Create a new Vector of the same underlying type by cloning "this", and return a pointer to the new vector. If type is NOX::DeepCopy, then we need to create an exact replica of "this". Otherwise, if type is NOX::ShapeCopy, we need only replicate the shape of "this". Note that there is no assumption that a vector created by ShapeCopy is initialized to zeros.
Implements NOX::Abstract::Vector. |
|
|
Dot product with Here x represents this vector, and we compute its dot product with y as follows:
Implements NOX::Abstract::Vector. |
|
|
Initialize every element of this vector with Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
|
Prints out the vector to the specified stream. For example, a vector would appear as
It will be all on one line, with a single space between each entry, bracketed on either side. |
|
|
Return the length of vector.
Implements NOX::Abstract::Vector. |
|
|
Weighted 2-Norm. Here x represents this vector, and we compute its weighted norm as follows:
Implements NOX::Abstract::Vector. |
|
|
Norm. Here x represents this vector, and we compute its norm as follows: for each NOX::Abstract::Vector::NormType:
Implements NOX::Abstract::Vector. |
|
|
Copy source vector Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
|
Put element-wise reciprocal of source vector Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
|
Scale this vector element-by-element by the vector a. Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
|
Scale each element of this vector by Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
||||||||||||||||||||||||
|
Compute x = (alpha * a) + (beta * b) + (gamma * x) where x is this vector. Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
|
||||||||||||||||
|
Compute x = (alpha * a) + (gamma * x) where x is this vector. Here x represents this vector, and we update it as
Implements NOX::Abstract::Vector. |
1.3.9.1