#include <prob_transition.hh>
Public Member Functions | |
size_int_t | get_trans_count () const |
const transition_t * | get_transition (const size_int_t i) const |
transition_t * | get_transition (const size_int_t i) |
Returns a pointer to the `i'-th transition of the probabilistic transition. | |
ulong_int_t | get_weight (const size_int_t i) const |
Returns a weight of `i'-th transition. | |
ulong_int_t | get_weight_sum () const |
prob_transition_t (prob_system_t *const system) | |
A constructor. | |
prob_transition_t () | |
A constructor. | |
void | set_trans_count (const size_int_t size) |
Sets a number of transitions contained in the probabilistic transition. | |
void | set_transition_and_weight (const size_int_t i, transition_t *const p_trans, const ulong_int_t weight) |
Sets `i'-th transition and its weight. | |
Protected Member Functions | |
void | initialize () |
A protected initializer. | |
Protected Attributes | |
array_t< ulong_int_t > | prob_weights |
array_t< transition_t * > | trans |
ulong_int_t | weight_sum |
This class represents a probabilistic transition. It is a part of the model of a probabilistic system.
This class is derived from transition_t, although, in fact, it is really different from the ordinary system transition:
prob_trans.get_weight(i)/prob_trans.get_weight_sum()
size_int_t get_trans_count | ( | ) | const [inline] |
Returns a number of transition, which the probabilistic transition consists of
Referenced by prob_system_t::consolidate(), and dve_prob_process_t::write().
const transition_t* get_transition | ( | const size_int_t | i | ) | const [inline] |
Returns a pointer to the constant `i'-th transition of the probabilistic transition
ulong_int_t get_weight_sum | ( | ) | const [inline] |
Returns a sum of weights of all transitions contained in the probabilistic transition
Referenced by dve_prob_explicit_system_t::get_succs().
void set_trans_count | ( | const size_int_t | size | ) |
Sets a number of transitions contained in the probabilistic transition.
References array_t::resize().
Referenced by dve_parser_t::prob_trans_create().
void set_transition_and_weight | ( | const size_int_t | i, | |
transition_t *const | p_trans, | |||
const ulong_int_t | weight | |||
) |
Sets `i'-th transition and its weight.
delete(pr_trans.get_transition(i))
before rewritting it by the pointer to another transition. Referenced by dve_parser_t::prob_trans_create().