Fermat
Public Types | Public Methods | Static Public Members | List of all members
cugar::Mixture< TDistribution, NCOMP > Struct Template Reference

Detailed description

template<typename TDistribution, uint32 NCOMP>
struct cugar::Mixture< TDistribution, NCOMP >

A statically-sized mixture of parametric distributions

Template Parameters
TDistributionthe underlying distribution type
NCOMPthe number of components, each of type TDistribution

#include <mixtures.h>

Public Types

typedef TDistribution distribution_type
 

Public Methods

CUGAR_HOST_DEVICE Mixture ()
 
CUGAR_HOST_DEVICE uint32 size () const
 
CUGAR_HOST_DEVICE float density (const Vector2f x) const
 
CUGAR_HOST_DEVICE float density (const uint32 i, const Vector2f x) const
 
CUGAR_HOST_DEVICE const distribution_type & component (const uint32 i) const
 
CUGAR_HOST_DEVICE distribution_type & component (const uint32 i)
 
CUGAR_HOST_DEVICE void set_component (const uint32 i, const distribution_type &c, const float w)
 
CUGAR_HOST_DEVICE void set_component (const uint32 i, const distribution_type &c)
 
CUGAR_HOST_DEVICE float weight (const uint32 i) const
 
CUGAR_HOST_DEVICE void set_weight (const uint32 i, const float w)
 

Static Public Members

static const uint32 NUM_COMPONENTS = NCOMP
 

Constructor & Destructor Documentation

◆ Mixture()

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE cugar::Mixture< TDistribution, NCOMP >::Mixture ( )
inline

constructor

Member Function Documentation

◆ component() [1/2]

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE const distribution_type& cugar::Mixture< TDistribution, NCOMP >::component ( const uint32  i) const
inline

return the i-th component

Parameters
icomponent index

◆ component() [2/2]

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE distribution_type& cugar::Mixture< TDistribution, NCOMP >::component ( const uint32  i)
inline

return the i-th component

Parameters
icomponent index

◆ density() [1/2]

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE float cugar::Mixture< TDistribution, NCOMP >::density ( const Vector2f  x) const
inline

probability density function

Parameters
xsample location

◆ density() [2/2]

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE float cugar::Mixture< TDistribution, NCOMP >::density ( const uint32  i,
const Vector2f  x 
) const
inline

probability density function of the i-th component

Parameters
xsample location

◆ set_component() [1/2]

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE void cugar::Mixture< TDistribution, NCOMP >::set_component ( const uint32  i,
const distribution_type &  c,
const float  w 
)
inline

set the i-th component

Parameters
icomponent index

◆ set_component() [2/2]

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE void cugar::Mixture< TDistribution, NCOMP >::set_component ( const uint32  i,
const distribution_type &  c 
)
inline

set the i-th component

Parameters
icomponent index

◆ set_weight()

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE void cugar::Mixture< TDistribution, NCOMP >::set_weight ( const uint32  i,
const float  w 
)
inline

return the i-th component weight

Parameters
icomponent index

◆ size()

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE uint32 cugar::Mixture< TDistribution, NCOMP >::size ( ) const
inline

size of the mixture

◆ weight()

template<typename TDistribution, uint32 NCOMP>
CUGAR_HOST_DEVICE float cugar::Mixture< TDistribution, NCOMP >::weight ( const uint32  i) const
inline

return the i-th component weight

Parameters
icomponent index

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