#include <Thyra_VectorDecl.hpp>
Inheritance diagram for Thyra::Converter< Scalar, TargetType >:
Public Member Functions | |
| virtual | ~Converter () |
| | |
| virtual TargetType | convert () const =0 |
| Convert to the specified target type (e.g., Vector or ConstVector). | |
| virtual void | evalInto (Vector< Scalar > &acceptor) const =0 |
| Evaluate this object, writing the results into the acceptor vector. | |
| virtual bool | containsVector (const Thyra::VectorBase< Scalar > *vec) const =0 |
| Determine whether this object contains the given vector. | |
| virtual void | addInto (Vector< Scalar > &other, Thyra::LCSign sign) const =0 |
| Evaluate this object, adding the results into the argument vector. The sign argument indicates whether this operation is an addition or a subtraction. | |
Obviously, vectors can be converted to vectors, but so can linear combinations of vectors or operators times vectors.
This interface is key to efficient overloaded operators. Operators do not perform vector operations directly; rather, they construct Converter subtypes (such as LC2 or OpTimesLC) that represent the operation to be performed. The actual operations are carried out only upon either (a) assignment to a vector, or (b) the Converter is used in a context in which its vector value is required, for instance, when an operation such as a norm is to be performed.
Because overloaded operators must always create and return temporary objects, returning constant-size deferred-evaluation Converter subtypes rather than vectors results in constant-time overhead rather than the
overhead that would be incurred with vector return values.
Definition at line 79 of file Thyra_VectorDecl.hpp.
|
|||||||||
|
Definition at line 83 of file Thyra_VectorDecl.hpp. |
|
|||||||||
|
Convert to the specified target type (e.g., Vector or ConstVector).
Implemented in Thyra::ConstVector< Scalar >. |
|
||||||||||
|
Evaluate this object, writing the results into the acceptor vector.
Implemented in Thyra::ConstVector< Scalar >. |
|
||||||||||
|
Determine whether this object contains the given vector.
Implemented in Thyra::ConstVector< Scalar >. |
|
||||||||||||||||
|
Evaluate this object, adding the results into the argument vector. The sign argument indicates whether this operation is an addition or a subtraction.
Implemented in Thyra::ConstVector< Scalar >. |
1.3.9.1