Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::generator::Distribution< IndexType, ValueType > Class Template Reference

#include <Distribution.h>

Public Types

typedef std::vector< DistributionEntry< IndexType, ValueType > > ContainerType
 

Public Member Functions

 Distribution ()
 
 Distribution (Distribution const &)
 
 Distribution (Distribution &&)
 
Distributionoperator= (Distribution const &)
 
Distributionoperator= (Distribution &&)
 
void add (DistributionEntry< IndexType, ValueType > const &entry)
 Adds the given entry to the distribution.
 
void add (IndexType const &index, ValueType const &value)
 Adds the given entry to the distribution.
 
void add (Distribution &&distribution)
 Adds the given other distribution to the distribution.
 
void compress ()
 Compresses the internal storage by summing the values of entries which agree on the index.
 
void divide (ValueType const &value)
 Divides all values in the distribution by the provided value.
 
void clear ()
 Clears this distribution.
 
ContainerType::iterator begin ()
 Access to iterators over the entries of the distribution.
 
ContainerType::const_iterator begin () const
 
ContainerType::iterator end ()
 
ContainerType::const_iterator end () const
 

Detailed Description

template<typename IndexType, typename ValueType>
class storm::generator::Distribution< IndexType, ValueType >

Definition at line 10 of file Distribution.h.

Member Typedef Documentation

◆ ContainerType

template<typename IndexType , typename ValueType >
typedef std::vector<DistributionEntry<IndexType, ValueType> > storm::generator::Distribution< IndexType, ValueType >::ContainerType

Definition at line 12 of file Distribution.h.

Constructor & Destructor Documentation

◆ Distribution() [1/3]

template<typename IndexType , typename ValueType >
storm::generator::Distribution< IndexType, ValueType >::Distribution ( )

Definition at line 10 of file Distribution.cpp.

◆ Distribution() [2/3]

template<typename IndexType , typename ValueType >
storm::generator::Distribution< IndexType, ValueType >::Distribution ( Distribution< IndexType, ValueType > const &  other)

Definition at line 15 of file Distribution.cpp.

◆ Distribution() [3/3]

template<typename IndexType , typename ValueType >
storm::generator::Distribution< IndexType, ValueType >::Distribution ( Distribution< IndexType, ValueType > &&  other)

Definition at line 21 of file Distribution.cpp.

Member Function Documentation

◆ add() [1/3]

template<typename IndexType , typename ValueType >
void storm::generator::Distribution< IndexType, ValueType >::add ( Distribution< IndexType, ValueType > &&  distribution)

Adds the given other distribution to the distribution.

Definition at line 59 of file Distribution.cpp.

◆ add() [2/3]

template<typename IndexType , typename ValueType >
void storm::generator::Distribution< IndexType, ValueType >::add ( DistributionEntry< IndexType, ValueType > const &  entry)

Adds the given entry to the distribution.

Definition at line 47 of file Distribution.cpp.

◆ add() [3/3]

template<typename IndexType , typename ValueType >
void storm::generator::Distribution< IndexType, ValueType >::add ( IndexType const &  index,
ValueType const &  value 
)

Adds the given entry to the distribution.

Definition at line 53 of file Distribution.cpp.

◆ begin() [1/2]

template<typename IndexType , typename ValueType >
Distribution< IndexType, ValueType >::ContainerType::iterator storm::generator::Distribution< IndexType, ValueType >::begin ( )

Access to iterators over the entries of the distribution.

Note that there may be multiple entries for the same index. Also, no order is guaranteed. After a call to compress, the order is guaranteed to be ascending wrt. index and there are no elements with the same index.

Definition at line 108 of file Distribution.cpp.

◆ begin() [2/2]

template<typename IndexType , typename ValueType >
Distribution< IndexType, ValueType >::ContainerType::const_iterator storm::generator::Distribution< IndexType, ValueType >::begin ( ) const

Definition at line 113 of file Distribution.cpp.

◆ clear()

template<typename IndexType , typename ValueType >
void storm::generator::Distribution< IndexType, ValueType >::clear ( )

Clears this distribution.

Definition at line 102 of file Distribution.cpp.

◆ compress()

template<typename IndexType , typename ValueType >
void storm::generator::Distribution< IndexType, ValueType >::compress ( )

Compresses the internal storage by summing the values of entries which agree on the index.

As a side effect, this sorts the entries in the distribution by their index.

Definition at line 65 of file Distribution.cpp.

◆ divide()

template<typename IndexType , typename ValueType >
void storm::generator::Distribution< IndexType, ValueType >::divide ( ValueType const &  value)

Divides all values in the distribution by the provided value.

Definition at line 95 of file Distribution.cpp.

◆ end() [1/2]

template<typename IndexType , typename ValueType >
Distribution< IndexType, ValueType >::ContainerType::iterator storm::generator::Distribution< IndexType, ValueType >::end ( )

Definition at line 118 of file Distribution.cpp.

◆ end() [2/2]

template<typename IndexType , typename ValueType >
Distribution< IndexType, ValueType >::ContainerType::const_iterator storm::generator::Distribution< IndexType, ValueType >::end ( ) const

Definition at line 123 of file Distribution.cpp.

◆ operator=() [1/2]

template<typename IndexType , typename ValueType >
Distribution< IndexType, ValueType > & storm::generator::Distribution< IndexType, ValueType >::operator= ( Distribution< IndexType, ValueType > &&  other)

Definition at line 37 of file Distribution.cpp.

◆ operator=() [2/2]

template<typename IndexType , typename ValueType >
Distribution< IndexType, ValueType > & storm::generator::Distribution< IndexType, ValueType >::operator= ( Distribution< IndexType, ValueType > const &  other)

Definition at line 28 of file Distribution.cpp.


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