OpendTect 8.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SecondOrderPoly Class Reference

A class for 2nd order polynomials of the form: a x^2 + b x + c. More...

#include <mathfunc.h>

Inheritance diagram for SecondOrderPoly:
[legend]

Public Member Functions

 SecondOrderPoly (float a_=0, float b_=0, float c_=0)
 
LineParameters< float > * createDerivative () const
 
float getExtremePos () const
 
int getRoots (float &pos0, float &pos1) const
 
float getValue (float pos) const override
 
void setFromSamples (float y0, float y1, float y2)
 
- Public Member Functions inherited from MathFunction< float, float >
float getNDValue (const float *pos) const override
 
int getNrDim () const override
 
- Public Member Functions inherited from MathFunctionND< RT, PT >
virtual ~MathFunctionND ()
 
virtual RT getNDValue (const PT *) const =0
 

Public Attributes

float a
 
float b
 
float c
 

Detailed Description

A class for 2nd order polynomials of the form: a x^2 + b x + c.

<>

Constructor & Destructor Documentation

◆ SecondOrderPoly()

SecondOrderPoly::SecondOrderPoly ( float a_ = 0,
float b_ = 0,
float c_ = 0 )
inline

Member Function Documentation

◆ createDerivative()

LineParameters< float > * SecondOrderPoly::createDerivative ( ) const

◆ getExtremePos()

float SecondOrderPoly::getExtremePos ( ) const
inline

◆ getRoots()

int SecondOrderPoly::getRoots ( float & pos0,
float & pos1 ) const
inline

◆ getValue()

float SecondOrderPoly::getValue ( float pos) const
inlineoverridevirtual

◆ setFromSamples()

void SecondOrderPoly::setFromSamples ( float y0,
float y1,
float y2 )
inline

Fits the polynomial through the points. The points are considered to be sampled with y0 at x=-1 and y2 at x=1

Member Data Documentation

◆ a

float SecondOrderPoly::a

◆ b

float SecondOrderPoly::b

◆ c

float SecondOrderPoly::c

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2025