wavelength 1.0.0
Loading...
Searching...
No Matches
Polynomial Class Reference

A polynomial read from a configuration array. More...

#include <polynomial.h>

Public Member Functions

 Polynomial ()
 Construct a polynomial with no coefficients.
 ~Polynomial ()
 Destroy the polynomial.
void Load (const DataArray *pData)
 Replace the coefficients with the nodes of an array after its tag.
float Eval (float flX) const
 Evaluate the polynomial by Horner's rule.

Detailed Description

A polynomial read from a configuration array.

The class is not polymorphic, and the name is inferred from Eval(). The object is the vector of its coefficients.

Constructor & Destructor Documentation

◆ Polynomial()

Polynomial::Polynomial ( )

Construct a polynomial with no coefficients.

Ghidra address:
NTSC-U/C: 0x001e3170
Ghidra address:
PAL: 0x001ebf10

◆ ~Polynomial()

Polynomial::~Polynomial ( )

Destroy the polynomial.

Ghidra address:
NTSC-U/C: 0x001e3190
Ghidra address:
PAL: 0x001ebf30

Member Function Documentation

◆ Load()

void Polynomial::Load ( const DataArray * pData)

Replace the coefficients with the nodes of an array after its tag.

Parameters
pDataThe array, the coefficient of the highest power first.
Ghidra address:
NTSC-U/C: 0x001e31f0
Ghidra address:
PAL: 0x001ebf90

◆ Eval()

float Polynomial::Eval ( float flX) const

Evaluate the polynomial by Horner's rule.

Parameters
flXThe variable.
Returns
The value, 0 for a polynomial with no coefficients.
Ghidra address:
NTSC-U/C: 0x001e32c8
Ghidra address:
PAL: 0x001ec068

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