3 #include <fluxionum/Function.h>
19 template <
typename A,
typename B>
61 B
eval(A
const &x)
override{
Abstract class representing a function.
Definition: Function.h:27
Simple linear function.
Definition: SimpleLinearFunction.h:20
B intercept
The intercept of the linear function.
Definition: SimpleLinearFunction.h:31
B eval(A const &x) override
Calculate the image of by assuming a linear behavior where is the slope and is the intercept.
Definition: SimpleLinearFunction.h:61
SimpleLinearFunction(B const slope, B const intercept)
SimpleLinearFunction default constructor.
Definition: SimpleLinearFunction.h:41
B getSlope() const
Obtain the slope of the linear function.
Definition: SimpleLinearFunction.h:71
B slope
The slope of the linear function.
Definition: SimpleLinearFunction.h:27
B getIntercept() const
Obtain the intercept of the linear function.
Definition: SimpleLinearFunction.h:76