#include <blockop.hh>
Inheritance diagram for RVL::InjectOp< Scalar >:
Public Member Functions | |
InjectOp (std::shared_ptr< Vector< Scalar > > _ref, int _icomp) | |
InjectOp (std::shared_ptr< Vector< Scalar > > _ref, std::vector< int > _icvec) | |
InjectOp (InjectOp< Scalar > const &f) | |
~InjectOp () | |
Space< Scalar > const & | getDomain () const |
Space< Scalar > const & | getRange () const |
ostream & | write (ostream &str) const |
Protected Member Functions | |
void | apply (Vector< Scalar > const &x, Vector< Scalar > &y) const |
void | applyDeriv (Vector< Scalar > const &x, Vector< Scalar > const &dx, Vector< Scalar > &dy) const |
void | applyAdjDeriv (Vector< Scalar > const &x, Vector< Scalar > const &dy, Vector< Scalar > &dx) const |
Operator< Scalar > * | clone () const |
Takes vector in a product of component (sub)spaces as input, replaces corresponding components of output with input. Replaces all other components with constant data members.
Usual linear injection and projection operators are the derivative and adjoint deriv of this op.
For convenience of definition, takes a const reference to a vector in the product range space as arg to constructor, initializes a copy as data member. The apply method copies this vector to the output, then replaces the indicated components with corresponding input components.
Relies on error trapping in component subspace operations - implements no additional traps.
NOTE added 04.09.15 WWS: because of the current limitations of ProductSpace construction, number of components limited to 4, with clunky constructor interfaces.
Definition at line 1137 of file blockop.hh.
RVL::InjectOp< Scalar >::InjectOp | ( | std::shared_ptr< Vector< Scalar > > | _ref, | |
int | _icomp | |||
) |
RVL::InjectOp< Scalar >::InjectOp | ( | std::shared_ptr< Vector< Scalar > > | _ref, | |
std::vector< int > | _icvec | |||
) |
Definition at line 1206 of file blockop.hh.
RVL::InjectOp< Scalar >::InjectOp | ( | InjectOp< Scalar > const & | f | ) |
Definition at line 1213 of file blockop.hh.
RVL::InjectOp< Scalar >::~InjectOp | ( | ) |
Definition at line 1216 of file blockop.hh.
void RVL::InjectOp< Scalar >::apply | ( | Vector< Scalar > const & | x, | |
Vector< Scalar > & | y | |||
) | const [protected, virtual] |
Implements RVL::Operator< Scalar >.
Definition at line 1148 of file blockop.hh.
References RVL::Vector< Scalar >::copy().
void RVL::InjectOp< Scalar >::applyDeriv | ( | Vector< Scalar > const & | x, | |
Vector< Scalar > const & | dx, | |||
Vector< Scalar > & | dy | |||
) | const [protected, virtual] |
Implements RVL::Operator< Scalar >.
Definition at line 1165 of file blockop.hh.
References RVL::Vector< Scalar >::zero().
void RVL::InjectOp< Scalar >::applyAdjDeriv | ( | Vector< Scalar > const & | x, | |
Vector< Scalar > const & | dy, | |||
Vector< Scalar > & | dx | |||
) | const [protected, virtual] |
Operator<Scalar>* RVL::InjectOp< Scalar >::clone | ( | ) | const [protected, virtual] |
Implements RVL::Operator< Scalar >.
Definition at line 1196 of file blockop.hh.
References RVL::InjectOp< Scalar >::InjectOp().
Space<Scalar> const& RVL::InjectOp< Scalar >::getDomain | ( | ) | const [virtual] |
Space<Scalar> const& RVL::InjectOp< Scalar >::getRange | ( | ) | const [virtual] |
ostream& RVL::InjectOp< Scalar >::write | ( | ostream & | str | ) | const [virtual] |