Public Member Functions | Public Attributes | List of all members
vpdl_mixture< T, n >::component Struct Reference

A struct to hold the component distributions and weights. More...

Public Member Functions

 component ()
 Constructor. More...
 
 component (const vpdl_distribution< T, n > &d, const T &w=T(0))
 Constructor. More...
 
 component (const component &other)
 Copy Constructor. More...
 
bool operator< (const component &rhs) const
 Used to sort by decreasing weight. More...
 

Public Attributes

std::unique_ptr< vpdl_distribution< T, n > > distribution
 The distribution. More...
 
weight
 The weight. More...
 

Detailed Description

template<class T, unsigned int n = 0>
struct vpdl_mixture< T, n >::component

A struct to hold the component distributions and weights.

This class is private and should not be used outside of the mixture. Dynamic memory is used to allow for polymorphic distributions. However, this use of memory is self-contained and private so the user should not be able to introduce a memory leak

Definition at line 46 of file vpdl_mixture.h.

Constructor & Destructor Documentation

◆ component() [1/3]

template<class T, unsigned int n = 0>
vpdl_mixture< T, n >::component::component ( )
inline

Constructor.

Definition at line 49 of file vpdl_mixture.h.

◆ component() [2/3]

template<class T, unsigned int n = 0>
vpdl_mixture< T, n >::component::component ( const vpdl_distribution< T, n > &  d,
const T &  w = T(0) 
)
inline

Constructor.

Definition at line 51 of file vpdl_mixture.h.

◆ component() [3/3]

template<class T, unsigned int n = 0>
vpdl_mixture< T, n >::component::component ( const component other)
inline

Copy Constructor.

Definition at line 54 of file vpdl_mixture.h.

Member Function Documentation

◆ operator<()

template<class T, unsigned int n = 0>
bool vpdl_mixture< T, n >::component::operator< ( const component rhs) const
inline

Used to sort by decreasing weight.

Definition at line 58 of file vpdl_mixture.h.

Member Data Documentation

◆ distribution

template<class T, unsigned int n = 0>
std::unique_ptr<vpdl_distribution<T,n> > vpdl_mixture< T, n >::component::distribution

The distribution.

Definition at line 64 of file vpdl_mixture.h.

◆ weight

template<class T, unsigned int n = 0>
T vpdl_mixture< T, n >::component::weight

The weight.

Definition at line 66 of file vpdl_mixture.h.


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