00001
00002
00003
00004 #ifndef DIVINE_PROB_TRANSITION_HH
00005 #define DIVINE_PROB_TRANSITION_HH
00006
00007 #include "system/system.hh"
00008 #include "system/prob_system.hh"
00009
00010 #ifndef DOXYGEN_PROCESSING
00011
00012 namespace divine {
00013 using std::cerr; using std::endl;
00014 #endif //DOXYGEN_PROCESSING
00015
00016
00017
00018 class system_t;
00019 class prob_system_t;
00020
00021
00023
00033 class prob_transition_t: public virtual transition_t
00034 {
00035 protected:
00036 ulong_int_t weight_sum;
00037 array_t<ulong_int_t> prob_weights;
00038 array_t<transition_t*> trans;
00039
00041 void initialize();
00042
00043 public:
00044
00046 prob_transition_t();
00047
00049 prob_transition_t(prob_system_t * const system);
00050
00053 size_int_t get_trans_count() const
00054 {
00055 return trans.size();
00056 }
00057
00059 transition_t * get_transition(const size_int_t i)
00060 {
00061 return trans[i];
00062 }
00063
00066 const transition_t * get_transition(const size_int_t i) const
00067 {
00068 return trans[i];
00069 }
00070
00072 ulong_int_t get_weight(const size_int_t i) const
00073 {
00074 return prob_weights[i];
00075 }
00076
00079
00083 ulong_int_t get_weight_sum() const
00084 {
00085 return weight_sum;
00086 }
00087
00089
00093 void set_trans_count(const size_int_t size);
00094
00096
00102 void set_transition_and_weight(const size_int_t i,
00103 transition_t * const p_trans, const ulong_int_t weight);
00104
00105 };
00106
00107 #ifndef DOXYGEN_PROCESSING
00108 }
00109
00110 #endif //DOXYGEN_PROCESSING
00111
00112 #endif
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123