|
ROL
|
#include <example_02.hpp>
Inheritance diagram for ConStdVector< Real, Element >:Public Member Functions | |
| ConStdVector (const ROL::Ptr< std::vector< Element > > &std_vec) | |
| void | plus (const ROL::Vector< Real > &x) |
| Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\). More... | |
| void | scale (const Real alpha) |
| Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\). More... | |
| Real | dot (const ROL::Vector< Real > &x) const |
| Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More... | |
| Real | norm () const |
| Returns \( \| y \| \) where \(y = \mathtt{*this}\). More... | |
| ROL::Ptr< ROL::Vector< Real > > | clone () const |
| Clone to make a new (uninitialized) vector. More... | |
| ROL::Ptr< const std::vector < Element > > | getVector () const |
| ROL::Ptr< std::vector< Element > > | getVector () |
| ROL::Ptr< ROL::Vector< Real > > | basis (const int i) const |
| Return i-th basis vector. More... | |
| int | dimension () const |
| Return dimension of the vector space. More... | |
| const ROL::Vector< Real > & | dual () const |
| Return dual representation of \(\mathtt{*this}\), for example, the result of applying a Riesz map, or change of basis, or change of memory layout. More... | |
| Real | apply (const ROL::Vector< Real > &x) const |
| Apply \(\mathtt{*this}\) to a dual vector. This is equivalent to the call \(\mathtt{this->dot(x.dual())}\). More... | |
| ConStdVector (const ROL::Ptr< std::vector< Element > > &std_vec) | |
| void | plus (const Vector< Real > &x) |
| Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\). More... | |
| void | scale (const Real alpha) |
| Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\). More... | |
| Real | dot (const Vector< Real > &x) const |
| Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More... | |
| Real | norm () const |
| Returns \( \| y \| \) where \(y = \mathtt{*this}\). More... | |
| ROL::Ptr< Vector< Real > > | clone () const |
| Clone to make a new (uninitialized) vector. More... | |
| ROL::Ptr< const std::vector < Element > > | getVector () const |
| ROL::Ptr< std::vector< Element > > | getVector () |
| ROL::Ptr< Vector< Real > > | basis (const int i) const |
| Return i-th basis vector. More... | |
| int | dimension () const |
| Return dimension of the vector space. More... | |
| const Vector< Real > & | dual () const |
| Return dual representation of \(\mathtt{*this}\), for example, the result of applying a Riesz map, or change of basis, or change of memory layout. More... | |
Public Member Functions inherited from ROL::Vector< Real > | |
| virtual | ~Vector () |
| virtual void | axpy (const Real alpha, const Vector &x) |
| Compute \(y \leftarrow \alpha x + y\) where \(y = \mathtt{*this}\). More... | |
| virtual void | zero () |
| Set to zero vector. More... | |
| virtual void | set (const Vector &x) |
| Set \(y \leftarrow x\) where \(y = \mathtt{*this}\). More... | |
| virtual void | applyUnary (const Elementwise::UnaryFunction< Real > &f) |
| virtual void | applyBinary (const Elementwise::BinaryFunction< Real > &f, const Vector &x) |
| virtual Real | reduce (const Elementwise::ReductionOp< Real > &r) const |
| virtual void | print (std::ostream &outStream) const |
| virtual void | setScalar (const Real C) |
| Set \(y \leftarrow C\) where \(C\in\mathbb{R}\). More... | |
| virtual void | randomize (const Real l=0.0, const Real u=1.0) |
| Set vector to be uniform random between [l,u]. More... | |
| virtual std::vector< Real > | checkVector (const Vector< Real > &x, const Vector< Real > &y, const bool printToStream=true, std::ostream &outStream=std::cout) const |
| Verify vector-space methods. More... | |
Private Types | |
| typedef std::vector< Element > | vector |
| typedef ROL::Vector< Real > | V |
| typedef vector::size_type | uint |
| typedef std::vector< Element > | vector |
| typedef vector::size_type | uint |
Private Attributes | |
| ROL::Ptr< std::vector< Element > > | std_vec_ |
| ROL::Ptr< ConDualStdVector < Real > > | dual_vec_ |
Definition at line 36 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
|
private |
Definition at line 232 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
|
private |
Definition at line 233 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
|
private |
Definition at line 234 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
|
private |
Definition at line 264 of file gross-pitaevskii/example_02.hpp.
|
private |
Definition at line 265 of file gross-pitaevskii/example_02.hpp.
|
inline |
Definition at line 242 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
|
inline |
Definition at line 273 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\).
| [in] | x | is the vector to be added to \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \mathtt{*this} + x\).
Implements ROL::Vector< Real >.
Definition at line 244 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::dimension(), ConStdVector< Real, Element >::getVector(), and ConStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\).
| [in] | alpha | is the scaling of \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \alpha (\mathtt{*this}) \).
Implements ROL::Vector< Real >.
Definition at line 253 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::dimension(), and ConStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).
| [in] | x | is the vector that forms the dot product with \(\mathtt{*this}\). |
Implements ROL::Vector< Real >.
Definition at line 260 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::dimension(), ConStdVector< Real, Element >::getVector(), and ConStdVector< Real, Element >::std_vec_.
Referenced by ConStdVector< Real, Element >::norm().
|
inlinevirtual |
Returns \( \| y \| \) where \(y = \mathtt{*this}\).
Implements ROL::Vector< Real >.
Definition at line 271 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::dot().
|
inlinevirtual |
Clone to make a new (uninitialized) vector.
Provides the means of allocating temporary memory in ROL.
Implements ROL::Vector< Real >.
Definition at line 277 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::std_vec_.
|
inline |
Definition at line 281 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::std_vec_.
Referenced by ConStdVector< Real, Element >::apply(), ConStdVector< Real, Element >::dot(), and ConStdVector< Real, Element >::plus().
|
inline |
Definition at line 285 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Return i-th basis vector.
| [in] | i | is the index of the basis function. |
Overloading the basis is only required if the default gradient implementation is used, which computes a finite-difference approximation.
Reimplemented from ROL::Vector< Real >.
Definition at line 289 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Return dimension of the vector space.
Overload if the basis is overloaded.
Reimplemented from ROL::Vector< Real >.
Definition at line 297 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::std_vec_.
Referenced by ConStdVector< Real, Element >::apply(), ConStdVector< Real, Element >::dot(), ConStdVector< Real, Element >::plus(), and ConStdVector< Real, Element >::scale().
|
inlinevirtual |
Return dual representation of \(\mathtt{*this}\), for example, the result of applying a Riesz map, or change of basis, or change of memory layout.
By default, returns the current object. Please overload if you need a dual representation.
Reimplemented from ROL::Vector< Real >.
Definition at line 299 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::dual_vec_.
|
inlinevirtual |
Apply \(\mathtt{*this}\) to a dual vector. This is equivalent to the call \(\mathtt{this->dot(x.dual())}\).
| [in] | x | is a vector |
Reimplemented from ROL::Vector< Real >.
Definition at line 304 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References ConStdVector< Real, Element >::dimension(), ConStdVector< Real, Element >::getVector(), and ConStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\).
| [in] | x | is the vector to be added to \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \mathtt{*this} + x\).
Implements ROL::Vector< Real >.
Definition at line 275 of file gross-pitaevskii/example_02.hpp.
References ConStdVector< Real, Element >::getVector().
|
inlinevirtual |
Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\).
| [in] | alpha | is the scaling of \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \alpha (\mathtt{*this}) \).
Implements ROL::Vector< Real >.
Definition at line 284 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).
| [in] | x | is the vector that forms the dot product with \(\mathtt{*this}\). |
Implements ROL::Vector< Real >.
Definition at line 291 of file gross-pitaevskii/example_02.hpp.
References ConStdVector< Real, Element >::getVector().
|
inlinevirtual |
Returns \( \| y \| \) where \(y = \mathtt{*this}\).
Implements ROL::Vector< Real >.
Definition at line 303 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Clone to make a new (uninitialized) vector.
Provides the means of allocating temporary memory in ROL.
Implements ROL::Vector< Real >.
Definition at line 309 of file gross-pitaevskii/example_02.hpp.
|
inline |
Definition at line 313 of file gross-pitaevskii/example_02.hpp.
|
inline |
Definition at line 317 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Return i-th basis vector.
| [in] | i | is the index of the basis function. |
Overloading the basis is only required if the default gradient implementation is used, which computes a finite-difference approximation.
Reimplemented from ROL::Vector< Real >.
Definition at line 321 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Return dimension of the vector space.
Overload if the basis is overloaded.
Reimplemented from ROL::Vector< Real >.
Definition at line 328 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Return dual representation of \(\mathtt{*this}\), for example, the result of applying a Riesz map, or change of basis, or change of memory layout.
By default, returns the current object. Please overload if you need a dual representation.
Reimplemented from ROL::Vector< Real >.
Definition at line 330 of file gross-pitaevskii/example_02.hpp.
|
private |
Definition at line 237 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
Referenced by ConStdVector< Real, Element >::apply(), ConStdVector< Real, Element >::basis(), ConStdVector< Real, Element >::clone(), ConStdVector< Real, Element >::dimension(), ConStdVector< Real, Element >::dot(), ConStdVector< Real, Element >::getVector(), ConStdVector< Real, Element >::plus(), and ConStdVector< Real, Element >::scale().
|
mutableprivate |
Definition at line 238 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
Referenced by ConStdVector< Real, Element >::dual().
1.8.5