Helios++
Helios software for LiDAR simulations
|
Simple linear function. More...
#include <SimpleLinearFunction.h>
Public Member Functions | |
SimpleLinearFunction (B const slope, B const intercept) | |
SimpleLinearFunction default constructor. More... | |
B | eval (A const &x) override |
Calculate the image of \(x\) by \(f\) assuming a linear behavior where \(a\) is the slope and \(b\) is the intercept. More... | |
B | getSlope () const |
Obtain the slope \(a\) of the linear function. More... | |
B | getIntercept () const |
Obtain the intercept \(b\) of the linear function. More... | |
![]() | |
Function ()=default | |
B | operator() (A const &x) |
Evaluate the function \(f(x)=y\). More... | |
Protected Attributes | |
B | slope |
The slope \(a\) of the linear function. | |
B | intercept |
The intercept \(b\) of the linear function. | |
Simple linear function.
\[ f(x) = ax + b \]
|
inline |
SimpleLinearFunction default constructor.
|
inlineoverridevirtual |
Calculate the image of \(x\) by \(f\) assuming a linear behavior where \(a\) is the slope and \(b\) is the intercept.
\[ f(x) = ax + b \]
x | The input value belonging to the domain of the function |
Implements fluxionum::Function< A, B >.
|
inline |
Obtain the intercept \(b\) of the linear function.
|
inline |
Obtain the slope \(a\) of the linear function.