OpenShot Audio Library | OpenShotAudio 0.3.2
Loading...
Searching...
No Matches
juce::dsp::Polynomial< FloatingType > Class Template Reference

#include <juce_Polynomial.h>

Public Member Functions

 Polynomial ()
 
 Polynomial (const FloatingType *coefficients, int numCoefficients)
 
 Polynomial (const Polynomial &)=default
 
 Polynomial (Polynomial &&)=default
 
Polynomialoperator= (const Polynomial &)=default
 
Polynomialoperator= (Polynomial &&)=default
 
template<typename... Values>
 Polynomial (Values... items)
 
FloatingType operator[] (int index) const noexcept
 
FloatingTypeoperator[] (int index) noexcept
 
FloatingType operator() (FloatingType x) const noexcept
 
int getOrder () noexcept
 
Polynomial< FloatingTypewithGain (double gain) const
 
Polynomial< FloatingTypegetSumWith (const Polynomial< FloatingType > &other) const
 
Polynomial< FloatingTypegetProductWith (const Polynomial< FloatingType > &other) const
 

Detailed Description

template<typename FloatingType>
class juce::dsp::Polynomial< FloatingType >

A class representing a polynomial

Definition at line 38 of file juce_Polynomial.h.

Constructor & Destructor Documentation

◆ Polynomial() [1/5]

template<typename FloatingType >
juce::dsp::Polynomial< FloatingType >::Polynomial ( )
inline

Creates a new polynomial which will always evaluate to zero.

Definition at line 43 of file juce_Polynomial.h.

◆ Polynomial() [2/5]

template<typename FloatingType >
juce::dsp::Polynomial< FloatingType >::Polynomial ( const FloatingType coefficients,
int  numCoefficients 
)
inline

Creates a new polynomial with given coefficients.

Parameters
numCoefficientsThe number of coefficients stored in coefficients. This is also the order of the returned polynomial.
coefficientsThe coefficients which will be used by the newly created polynomial. The Polynomial class will keep a private copy of the coefficients.

Definition at line 56 of file juce_Polynomial.h.

◆ Polynomial() [3/5]

Creates a copy of another polynomial.

◆ Polynomial() [4/5]

template<typename FloatingType >
juce::dsp::Polynomial< FloatingType >::Polynomial ( Polynomial< FloatingType > &&  )
default

Creates a copy of another polynomial.

◆ Polynomial() [5/5]

template<typename FloatingType >
template<typename... Values>
juce::dsp::Polynomial< FloatingType >::Polynomial ( Values...  items)
inline

Creates a new polynomial with coefficients by a C++11 initializer list. This function can be used in the following way: Polynomial<float> p ({0.5f, -0.3f, 0.2f});

Definition at line 79 of file juce_Polynomial.h.

Member Function Documentation

◆ getOrder()

template<typename FloatingType >
int juce::dsp::Polynomial< FloatingType >::getOrder ( )
inlinenoexcept

Returns the order of the polynomial.

Definition at line 104 of file juce_Polynomial.h.

◆ getProductWith()

template<typename FloatingType >
Polynomial< FloatingType > juce::dsp::Polynomial< FloatingType >::getProductWith ( const Polynomial< FloatingType > &  other) const
inline

computes the product of two polynomials and return the result

Definition at line 136 of file juce_Polynomial.h.

◆ getSumWith()

template<typename FloatingType >
Polynomial< FloatingType > juce::dsp::Polynomial< FloatingType >::getSumWith ( const Polynomial< FloatingType > &  other) const
inline

Returns the sum of this polynomial with another

Definition at line 122 of file juce_Polynomial.h.

◆ operator()()

template<typename FloatingType >
FloatingType juce::dsp::Polynomial< FloatingType >::operator() ( FloatingType  x) const
inlinenoexcept

Evaluates the value of the polynomial at a single point x.

Definition at line 92 of file juce_Polynomial.h.

◆ operator=() [1/2]

Creates a copy of another polynomial.

◆ operator=() [2/2]

Creates a copy of another polynomial.

◆ operator[]() [1/2]

template<typename FloatingType >
FloatingType juce::dsp::Polynomial< FloatingType >::operator[] ( int  index) const
inlinenoexcept

Returns a single coefficient of the receiver for reading

Definition at line 86 of file juce_Polynomial.h.

◆ operator[]() [2/2]

template<typename FloatingType >
FloatingType & juce::dsp::Polynomial< FloatingType >::operator[] ( int  index)
inlinenoexcept

Returns a single coefficient of the receiver for modifying.

Definition at line 89 of file juce_Polynomial.h.

◆ withGain()

template<typename FloatingType >
Polynomial< FloatingType > juce::dsp::Polynomial< FloatingType >::withGain ( double  gain) const
inline

Returns the polynomial with all its coefficients multiplied with a gain factor

Definition at line 111 of file juce_Polynomial.h.


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