Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes
vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::type > Class Template Reference

A vpdt specialization to make the weight functor work as a mixture accessor. More...

#include <bsta_basic_functors.h>

List of all members.

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.

Detailed Description

template<class mixture_>
class vpdt_mixture_accessor< mixture_, bsta_weight_functor< typename mixture_::component_type >, typename vpdt_enable_if< vpdt_is_mixture< mixture_ > >::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.


Member Typedef Documentation

template<class mixture_ >
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.

template<class mixture_ >
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.

template<class mixture_ >
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.


Constructor & Destructor Documentation

template<class mixture_ >
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.

template<class mixture_ >
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.


Member Function Documentation

template<class mixture_ >
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.


Member Data Documentation

template<class mixture_ >
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.

template<class mixture_ >
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.


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