31 #ifndef DRAIN_FUNCTOR_H_
32 #define DRAIN_FUNCTOR_H_
39 #include <drain/Log.h>
58 void setScale(
double scale,
double bias=0.0) {
75 Functor(
const std::string & name,
const std::string & description=
"",
double scale=1.0,
double bias=0.0) :
BeanLike(name, description),
78 Functor(
const Functor & fct) : BeanLike(fct) {
79 setScale(fct.scale, fct.bias);
93 void updateScale()
const {
122 double operator()(
double s)
const = 0;
131 double operator()(
double s)
const {
return s;};
142 double operator()(
double s1,
double s2)
const = 0;
Something which has a name, a description and possibly some parameters of varying type.
Definition: BeanLike.h:60
Definition: Functor.h:135
Base class for sequential computations. Optional scaling utilities.
Definition: Functor.h:52
double scale
Relative scale, typically 1. Optional.
Definition: Functor.h:99
double scaleFinal
Scaling factor after encodings of src and dst images are known.
Definition: Functor.h:106
double bias
"Relative" bias, typically 0. Optional.
Definition: Functor.h:102
virtual void updateBean() const override
Called after setParameters()
Definition: Functor.h:65
double biasFinal
Scaling factor after encodings of src and dst images are known.
Definition: Functor.h:110
Definition: DataSelector.cpp:1277
Definition: Functor.h:126
Definition: Functor.h:116