SPH
Public Member Functions | List of all members
Post::LinearFunction Class Reference

Class representing an ordinary 1D linear function. More...

#include <Analysis.h>

Public Member Functions

 LinearFunction (const Float slope, const Float offset)
 Creates a new linear function. More...
 
INLINE Float operator() (const Float x) const
 Evaluates the linear function for given value. More...
 
Float slope () const
 Returns the slope of the function. More...
 
Float offset () const
 Returns the offset in y-direction. More...
 
Float solve (const Float y) const
 Finds a value of x such that f(x) = y for given y. More...
 

Detailed Description

Class representing an ordinary 1D linear function.

Definition at line 311 of file Analysis.h.

Constructor & Destructor Documentation

◆ LinearFunction()

Post::LinearFunction::LinearFunction ( const Float  slope,
const Float  offset 
)
inline

Creates a new linear function.

Parameters
slopeSlope of the function (atan of the angle between the line and the x-axis).
offsetOffset in y-direction (value of the function for x=0).

Definition at line 320 of file Analysis.h.

Member Function Documentation

◆ offset()

Float Post::LinearFunction::offset ( ) const
inline

Returns the offset in y-direction.

Definition at line 335 of file Analysis.h.

◆ operator()()

INLINE Float Post::LinearFunction::operator() ( const Float  x) const
inline

Evaluates the linear function for given value.

Definition at line 325 of file Analysis.h.

◆ slope()

Float Post::LinearFunction::slope ( ) const
inline

Returns the slope of the function.

Definition at line 330 of file Analysis.h.

◆ solve()

Float Post::LinearFunction::solve ( const Float  y) const
inline

Finds a value of x such that f(x) = y for given y.

Slope of the function must not be zero.

Definition at line 342 of file Analysis.h.


The documentation for this class was generated from the following file: