A vpdt specialization to make the weight functor work as a mixture accessor. More...
#include <bsta_basic_functors.h>
Classes | |
struct | rebind |
rebind this functor to another distribution type. More... | |
Public Types | |
typedef bsta_weight_functor < typename mixture_::component_type > | accessor_type |
the accessor type. | |
typedef vpdt_dist_traits < mixture_ >::scalar_type | return_type |
the functor return type. | |
typedef mixture_ | distribution_type |
the distribution operated on by the functor. | |
Public Member Functions | |
vpdt_mixture_accessor (unsigned int index=0) | |
Constructor. | |
vpdt_mixture_accessor (const accessor_type &a, unsigned int index=0) | |
Constructor. | |
bool | operator() (const mixture_ &mix, return_type &retval) const |
The main function. | |
Public Attributes | |
unsigned int | idx |
The component index. | |
Static Public Attributes | |
static const bool | valid_functor = true |
is this functor valid for its distribution type. |
A vpdt specialization to make the weight functor work as a mixture accessor.
This is needed because weight is not a property of the mixture component, it is a property on the mixture itself that is defined for each component.
Definition at line 405 of file bsta_basic_functors.h.
typedef bsta_weight_functor<typename mixture_::component_type> vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::type >::accessor_type |
the accessor type.
Definition at line 411 of file bsta_basic_functors.h.
typedef mixture_ vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::type >::distribution_type |
the distribution operated on by the functor.
Definition at line 415 of file bsta_basic_functors.h.
typedef vpdt_dist_traits<mixture_>::scalar_type vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::type >::return_type |
the functor return type.
Definition at line 413 of file bsta_basic_functors.h.
vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::type >::vpdt_mixture_accessor | ( | unsigned int | index = 0 | ) | [inline] |
Constructor.
Definition at line 426 of file bsta_basic_functors.h.
vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::type >::vpdt_mixture_accessor | ( | const accessor_type & | a, |
unsigned int | index = 0 |
||
) | [inline] |
Constructor.
Definition at line 430 of file bsta_basic_functors.h.
bool vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::type >::operator() | ( | const mixture_ & | mix, |
return_type & | retval | ||
) | const [inline] |
The main function.
Definition at line 434 of file bsta_basic_functors.h.
unsigned int vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::type >::idx |
The component index.
Definition at line 444 of file bsta_basic_functors.h.
const bool vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::type >::valid_functor = true [static] |
is this functor valid for its distribution type.
Definition at line 417 of file bsta_basic_functors.h.