HOA Library  beta 3.0
High Order Ambisonics Library
Public Member Functions | Static Public Member Functions | List of all members
Harmonic< D, T > Class Template Reference

The class owns basic harmonics informations. More...

#include <Hoa_Harmonics.hpp>

Public Member Functions

 Harmonic (const size_t index) hoa_noexcept
 The harmonic constructor. More...
 
 ~Harmonic () hoa_noexcept
 The harmonic destructor.
 
size_t getIndex () const hoa_noexcept
 Returns the ACN index of the harmonic.
 
size_t getDegree () const hoa_noexcept
 Returns the precomputed degree of the harmonic.
 
long getOrder () const hoa_noexcept
 Returns the precomputed azimuthal order of the harmonic.
 
std::string getName () const hoa_noexcept
 Returns the name of the harmonic.
 
getNormalization () const hoa_noexcept
 Returns the normalization of the harmonic.
 
getSemiNormalization () const hoa_noexcept
 Returns the semi-normalization of the harmonic.
 

Static Public Member Functions

static long getIndex (const size_t degree, const long order) hoa_noexcept
 Returns the index of an harmonic for a specific degree and azimuthal order. More...
 
static size_t getDegree (const size_t index) hoa_noexcept
 Returns the degree of an harmonic for an index. More...
 
static long getOrder (const size_t index) hoa_noexcept
 Returns the azimuthal order of an harmonic for an index. More...
 
static size_t getNumberOfHarmonics (const size_t order) hoa_noexcept
 Returns the number of harmonics for an order of decomposition. More...
 
static size_t getNumberOfHarmonicsInDegree (const size_t degree) hoa_noexcept
 Returns the number of harmonics for a degree. More...
 
static T getNormalization (const size_t degree, const long order) hoa_noexcept
 Returns the normalization N3D or N2D of an harmonic. More...
 
static T getSemiNormalization (const size_t degree, const long order) hoa_noexcept
 Returns the semi-normalization of an harmonic. More...
 

Detailed Description

template<Dimension D, typename T>
class hoa::Harmonic< D, T >

The class owns basic harmonics informations.

The class allows to retrieves several informations about the harmonics: the numbering (ACN), the normalization (SN3D/N3D), the degree, the aziumthal order, etc.

Definition at line 22 of file Hoa_Harmonics.hpp.

Constructor & Destructor Documentation

Harmonic ( const size_t  index)
inline

The harmonic constructor.

Parameters
indexThe index must be at least 1.

Definition at line 32 of file Hoa_Harmonics.hpp.

Member Function Documentation

static long getIndex ( const size_t  degree,
const long  order 
)
inlinestatic

Returns the index of an harmonic for a specific degree and azimuthal order.

The computation is \(i=2|m|-(m<0)\) in 2D and \(i=(l(l+1))+m\) in 3D. with \(l\) the degree, \(m\) the azimuthal order and \(i\) the index of the harmonic.

Parameters
degreeThe degree of the harmonic.
orderThe order of the harmonic.

Definition at line 66 of file Hoa_Harmonics.hpp.

static size_t getDegree ( const size_t  index)
inlinestatic

Returns the degree of an harmonic for an index.

The computation is \(l=\frac{i+i\bmod{2}}{2}\) in 2D and \(l=\sqrt{i}\) in 3D. with \(l\) the degree and \(i\) the index of the harmonic.

Parameters
indexThe index of the harmonic.

Definition at line 73 of file Hoa_Harmonics.hpp.

static long getOrder ( const size_t  index)
inlinestatic

Returns the azimuthal order of an harmonic for an index.

The computation is \(m=l(1-2(i\bmod{2}))\) in 2D and \(m=i-(l(l+1))\) in 3D. with \(l\) the degree, \(m\) the azimuthal order and \(i\) the index of the harmonic.

Parameters
indexThe index of the harmonic.

Definition at line 81 of file Hoa_Harmonics.hpp.

static size_t getNumberOfHarmonics ( const size_t  order)
inlinestatic

Returns the number of harmonics for an order of decomposition.

The computation is \(2N+1\) in 2D and \((N+1)^{2}\) in 3D. with \(N\) the order of decomposition.

Parameters
orderThe order of decomposition.

Definition at line 89 of file Hoa_Harmonics.hpp.

static size_t getNumberOfHarmonicsInDegree ( const size_t  degree)
inlinestatic

Returns the number of harmonics for a degree.

The computation is \((degree\neq0)+1\) in 2D and \(2l+1\) in 3D. with \(l\) the degree.

Parameters
degreeThe degree.

Definition at line 96 of file Hoa_Harmonics.hpp.

static T getNormalization ( const size_t  degree,
const long  order 
)
inlinestatic

Returns the normalization N3D or N2D of an harmonic.

The semi-normalization \(k^{n2d}_{l, m}\) and \(k^{n3d}_{l, m}\) are defined by:

\[k^{n2d}_{l, m} = 1 \]

\[k^{n3d}_{l, m} = k^{sn3d}_{l, m}\sqrt{2l+1} \]

with \(l\) the degree, \(m\) the azimuthal order,

Parameters
degreeThe degree of the harmonic.
orderThe order of the harmonic.

Definition at line 107 of file Hoa_Harmonics.hpp.

static T getSemiNormalization ( const size_t  degree,
const long  order 
)
inlinestatic

Returns the semi-normalization of an harmonic.

Parameters
degreeThe degree of the harmonic.
orderThe order of the harmonic.

Definition at line 113 of file Hoa_Harmonics.hpp.