OpenShot Library | OpenShotAudio 0.2.2
juce::dsp::Polynomial< FloatingType > Class Template Reference

A class representing a polynomial. More...

#include <juce_Polynomial.h>

Public Member Functions

 Polynomial ()
 Creates a new polynomial which will always evaluate to zero. More...
 
 Polynomial (const FloatingType *coefficients, int numCoefficients)
 Creates a new polynomial with given coefficients. More...
 
 Polynomial (const Polynomial &)=default
 Creates a copy of another polynomial.
 
 Polynomial (Polynomial &&)=default
 Creates a copy of another polynomial.
 
Polynomialoperator= (const Polynomial &)=default
 Creates a copy of another polynomial.
 
Polynomialoperator= (Polynomial &&)=default
 Creates a copy of another polynomial.
 
template<typename... Values>
 Polynomial (Values... items)
 Creates a new polynomial with coefficients by a C++11 initializer list. More...
 
FloatingType operator[] (int index) const noexcept
 Returns a single coefficient of the receiver for reading. More...
 
FloatingType & operator[] (int index) noexcept
 Returns a single coefficient of the receiver for modifying. More...
 
FloatingType operator() (FloatingType x) const noexcept
 Evaluates the value of the polynomial at a single point x. More...
 
int getOrder () noexcept
 Returns the order of the polynomial. More...
 
Polynomial< FloatingType > withGain (double gain) const
 Returns the polynomial with all its coefficients multiplied with a gain factor. More...
 
Polynomial< FloatingType > getSumWith (const Polynomial< FloatingType > &other) const
 Returns the sum of this polynomial with another. More...
 
Polynomial< FloatingType > getProductWith (const Polynomial< FloatingType > &other) const
 computes the product of two polynomials and return the result More...
 

Detailed Description

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

A class representing a polynomial.

Definition at line 42 of file juce_Polynomial.h.

Constructor & Destructor Documentation

◆ Polynomial() [1/3]

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

Creates a new polynomial which will always evaluate to zero.

Definition at line 47 of file juce_Polynomial.h.

References juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::add().

◆ Polynomial() [2/3]

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 60 of file juce_Polynomial.h.

References juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::isEmpty().

◆ Polynomial() [3/3]

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 83 of file juce_Polynomial.h.

References juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::isEmpty().

Member Function Documentation

◆ 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 90 of file juce_Polynomial.h.

References juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getUnchecked().

◆ 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 93 of file juce_Polynomial.h.

References juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference().

◆ operator()()

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

◆ getOrder()

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

Returns the order of the polynomial.

Definition at line 108 of file juce_Polynomial.h.

References juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size().

◆ 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 115 of file juce_Polynomial.h.

◆ getSumWith()

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

◆ getProductWith()

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

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