JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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.
 
 Polynomial (const FloatingType *coefficients, int numCoefficients)
 Creates a new polynomial with given coefficients.
 
 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.
 
FloatingType operator[] (int index) const noexcept
 Returns a single coefficient of the receiver for reading.
 
FloatingTypeoperator[] (int index) noexcept
 Returns a single coefficient of the receiver for modifying.
 
FloatingType operator() (FloatingType x) const noexcept
 Evaluates the value of the polynomial at a single point x.
 
int getOrder () noexcept
 Returns the order of the polynomial.
 
Polynomial< FloatingTypewithGain (double gain) const
 Returns the polynomial with all its coefficients multiplied with a gain factor.
 
Polynomial< FloatingTypegetSumWith (const Polynomial< FloatingType > &other) const
 Returns the sum of this polynomial with another.
 
Polynomial< FloatingTypegetProductWith (const Polynomial< FloatingType > &other) const
 computes the product of two polynomials and return the result
 

Detailed Description

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

A class representing a polynomial.

@tags{DSP}

Definition at line 35 of file juce_Polynomial.h.

Constructor & Destructor Documentation

◆ Polynomial() [1/3]

Creates a new polynomial which will always evaluate to zero.

Definition at line 40 of file juce_Polynomial.h.

◆ Polynomial() [2/3]

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

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

◆ Polynomial() [3/3]

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

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

Member Function Documentation

◆ getOrder()

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

Returns the order of the polynomial.

Definition at line 101 of file juce_Polynomial.h.

◆ getProductWith()

computes the product of two polynomials and return the result

Definition at line 133 of file juce_Polynomial.h.

◆ getSumWith()

Returns the sum of this polynomial with another.

Definition at line 119 of file juce_Polynomial.h.

◆ operator()()

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

Definition at line 89 of file juce_Polynomial.h.

◆ operator[]() [1/2]

Returns a single coefficient of the receiver for reading.

Definition at line 83 of file juce_Polynomial.h.

◆ operator[]() [2/2]

Returns a single coefficient of the receiver for modifying.

Definition at line 86 of file juce_Polynomial.h.

◆ withGain()

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

Definition at line 108 of file juce_Polynomial.h.


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