polyfit - 2024.2 English

Vitis Libraries

Release Date
2024-11-29
Version
2024.2 English
#include "xf_fintech/polyfit.hpp"
template <
    typename DT,
    unsigned int D,
    unsigned int MAX_WIDTH
    >
void polyfit (
    const DT evalX [MAX_WIDTH],
    const DT evalPoints [MAX_WIDTH],
    unsigned int sizeEval,
    DT coefficients [D]
    )

Calculates the polynomial fitting to the D degree of the discrete set of points in ‘evalPoints’.

Parameters:

DT  
: The data type of the points
D  
: The degree of the polynomial that will approximate the set of points.
MAX_WIDTH  
: The maximum synthetisable amount of discrete points.
evalX  
: values on the X axis of the set of points.
evalPoints  
: Set of points to be approximated.
sizeEval  
: Length of ‘evalPoints’, must be <= MAX_WIDTH
coefficients  
: Output polynomial coefficients that approximate ‘evalPoints’ to the D degree, in decreasing order of degree.
#include "xf_fintech/polyfit.hpp"
template <
    typename DT,
    unsigned int D,
    unsigned int MAX_WIDTH
    >
void polyfit (
    const DT evalPoints [MAX_WIDTH],
    const unsigned int sizeEval,
    DT coefficients [D]
    )

Calculates the polynomial fitting to the D degree of the discrete set of points in ‘evalPoints’, assuming values on the X axis = [0, 1, 2, 3, …, MAX_WIDTH].

Parameters:

DT  
: The data type of the points
D  
: The degree of the polynomial that will approximate the set of points.
MAX_WIDTH  
: The maximum synthetisable amount of discrete points.
evalPoints  
: Set of points to be approximated.
sizeEval  
: Length of ‘evalPoints’, must be <= MAX_WIDTH
coefficients  
: Output polynomial coefficients that approximate ‘evalPoints’ to the D degree, in decreasing order of degree.