Class sdm::DiscreteDistribution
template <typename T>
Class List > sdm > DiscreteDistribution
#include <distribution.hpp>
Inherits the following classes: sdm::Distribution
Public Functions
Type | Name |
---|---|
DiscreteDistribution () | |
virtual double | getProbability (const T & begin, const T &=0) const |
virtual T | sample () const |
virtual void | setProbability (const T & item, double proba) |
virtual | ~DiscreteDistribution () |
Public Functions inherited from sdm::Distribution
Type | Name |
---|---|
virtual double | getProbability (const T & begin, const T & end) const = 0 |
virtual T | sample () const = 0 |
Protected Types
Type | Name |
---|---|
typedef bimap_item_index< T >::value_type | bimap_pair |
Protected Attributes
Type | Name |
---|---|
bimap_item_index< T > | bimap_item_to_index_ |
std::vector< double > | probabilities_ |
Public Functions Documentation
function DiscreteDistribution
sdm::DiscreteDistribution::DiscreteDistribution ()
function getProbability
virtual double sdm::DiscreteDistribution::getProbability (
const T & begin,
const T &=0
) const
Implements sdm::Distribution::getProbability
function sample
virtual T sdm::DiscreteDistribution::sample () const
Implements sdm::Distribution::sample
function setProbability
virtual void sdm::DiscreteDistribution::setProbability (
const T & item,
double proba
)
function ~DiscreteDistribution
inline virtual sdm::DiscreteDistribution::~DiscreteDistribution ()
Protected Types Documentation
typedef bimap_pair
typedef bimap_item_index<T>::value_type sdm::DiscreteDistribution< T >::bimap_pair;
Protected Attributes Documentation
variable bimap_item_to_index_
bimap_item_index<T> sdm::DiscreteDistribution< T >::bimap_item_to_index_;
variable probabilities_
std::vector<double> sdm::DiscreteDistribution< T >::probabilities_;
The documentation for this class was generated from the following file src/sdm/core/distribution.hpp