1#ifndef included_AMP_FunctionOperator
2#define included_AMP_FunctionOperator
5#include "AMP/operators/Operator.h"
15 std::string
type()
const override {
return "FunctionOperator"; }
16 void apply( std::shared_ptr<const AMP::LinearAlgebra::Vector> f,
17 std::shared_ptr<AMP::LinearAlgebra::Vector> r )
override
19 auto it_f = f->begin();
20 auto it_r = r->begin();
21 for (
size_t i = 0; i <
it_f.size(); ++i, ++
it_f, ++
it_r )
FunctionOperator(std::function< double(double)> f)
void apply(std::shared_ptr< const AMP::LinearAlgebra::Vector > f, std::shared_ptr< AMP::LinearAlgebra::Vector > r) override
std::function< double(double)> d_f
std::string type() const override
Return the name of the operator.
std::shared_ptr< AMP::Operator::Operator > shared_ptr