3 #include "QFog_constants.h" 5 #ifdef _mac_gui_app //''''''''''''''''''''''''''''''''''''''''''''\\. 10 #include "C_ANTHOLOGY_ITEM.h" 12 enum RUN_STATE{bef_run, dur_run, aft_run};
13 #endif //_mac_gui_app \\............................................// 30 #include "MY_FSTREAMS.h" 40 USHORT its_num_of_nd_ptrs;
41 USHORT its_num_of_nds;
45 const STRINGY * * its_nd_names_p_p;
49 USHORT its_final_era_len;
54 #ifdef _mac_gui_app //''''''''''''''''''''''''''''''''''''''''''''\\. 63 RUN_STATE its_run_state;
64 #endif //_mac_gui_app \\............................................// 75 NODE * get_nd_ptr(USHORT nd_id);
76 USHORT get_num_of_nds()
const;
78 const STRINGY & get_nd_name(USHORT nd_id)
const;
79 VOID set_nd_name(USHORT nd_id,
const STRINGY & name);
80 USHORT get_len_of_longest_nd_name();
82 USHORT get_len_of_longest_st_name(USHORT nd_id);
83 VOID set_state_name(USHORT nd_id, USHORT row_num,
const STRINGY & new_name);
85 const USHORT get_cur_finesse_of_amps()
const;
86 VOID filter_out_small_amps(USHORT finesse );
88 VOID set_act_sts_of_a_nd(USHORT nd_id,
const SET & act_sts);
89 VOID activate_a_nd_state(USHORT nd_id, USHORT st_id);
90 VOID empty_act_st_sets_of_all_nds();
91 VOID fill_act_st_sets_of_all_nds();
92 VOID preserve_act_st_sets_of_all_nds();
93 VOID restore_act_st_sets_of_all_nds();
95 BOOLEAN sort_into_layers_of_external_nds(
VECTOR<USHORT> & era_of, USHORT & num_of_eras);
97 BOOLEAN chrono_sort();
98 VOID grow_num_of_nd_ptrs();
99 VOID warn_user_about_cycle();
100 BOOLEAN add_int_arrow(USHORT s, USHORT d, BOOLEAN try_to_sort);
101 USHORT add_nd(
const STRINGY & nd_class_str, BOOLEAN try_to_sort);
103 VOID set_degen_of_a_nd(USHORT nd_id, USHORT degen);
104 USHORT get_degen_of_a_nd(USHORT nd_id);
105 USHORT get_max_degen();
107 USHORT get_num_of_bi_nds();
108 BI_NODE * get_bi_nd_ptr(USHORT loc);
109 STRINGY get_bi_nd_name(USHORT loc);
110 VOID get_bi_nd(USHORT loc, USHORT & nd1, USHORT & nd2);
111 BOOLEAN add_bi_nd(USHORT nd1, USHORT nd2);
112 VOID warn_user_about_repeated_bi_nd();
113 VOID warn_user_about_degenerate_bi_nd();
116 VOID create_nd_name_dictionary();
117 VOID create_nd_st_dictionaries();
118 VOID create_dictionaries();
119 VOID kill_nd_name_dictionary();
120 VOID kill_nd_st_dictionaries();
121 VOID kill_dictionaries();
130 VOID write_one_story_into_file(
132 USHORT net_story_count,
134 VOID write_header_of_nd_probs_file(
MY_OFSTREAM * nd_probs_stream_p);
135 VOID write_nd_probs_into_file(
136 const CHAR * ecase_name_cstr,
138 VOID write_bi_nd_probs_into_file(
139 const CHAR * ecase_name_cstr,
142 VOID set_cum_info_to_default();
144 VOID set_all_dyn_sts_to_max_ushort();
145 BOOLEAN external_nds_accept_ending(
const VECTOR<USHORT> & ending_vec);
146 BOOLEAN dyn_in_st_is_consistent(USHORT nd_id);
147 VOID send_dyn_in_st_to_nds(USHORT nd_id);
148 VOID use_dyn_in_sts_to_reconstruct_dyn_sts_for_times_larger_than(USHORT limit_time);
149 VOID set_dyn_net_story_and_amp();
150 VOID add_story_to_cum_amps();
151 VOID prepare_cum_info_for_next_ending();
152 VOID normalize_cum_probs();
153 VOID add_story_to_anthology( USHORT ending);
156 const CHAR * ecase_name_cstr,
160 BOOLEAN illustrate_stories,
162 USHORT & num_of_stories);
164 const CHAR * ecase_name_cstr,
168 BOOLEAN illustrate_stories);
169 VOID do_mini_run(DOUBLE & out_prob, USHORT & num_of_stories);
172 #ifdef _mac_gui_app //''''''''''''''''''''''''''''''''''''''''''''\\. 174 ND_CLASS_ID get_nd_class_id(USHORT nd_id)
const;
175 STRINGY get_nd_class_str(USHORT nd_id)
const;
180 USHORT get_num_of_arrows();
182 VOID reorder_nds(
const UI_MAP & map);
183 VOID reorder_nd_sts(USHORT nd_id,
const UI_MAP & map);
185 VOID del_int_arrow(USHORT s, USHORT d, BOOLEAN try_to_sort);
186 VOID del_nd(USHORT nd_id, BOOLEAN try_to_sort);
187 VOID del_bi_nd(USHORT xed_position);
188 VOID del_all_bi_nds_with_this_nd(USHORT nd_id);
190 BOOLEAN calc_closest_pts(
198 BOOLEAN try_to_sort);
200 ND_CLASS_ID nd_class_id,
201 const Point & m_down_pt,
202 BOOLEAN try_to_sort);
204 BOOLEAN nodes_have_same_state_set(USHORT nd1, USHORT nd2);
207 const RUN_STATE get_run_state()
const;
208 VOID set_run_state( RUN_STATE state);
211 USHORT get_anthology_len();
213 VOID write_net_stream(LStream & net_stream, NET_STREAM_TYPE stream_type);
214 VOID read_net_stream(LStream & net_stream, NET_STREAM_TYPE stream_type);
220 #endif //_mac_gui_app \\............................................// 229 NODE * QB_NET::get_nd_ptr(
232 return its_nds_p_p[nd_id];
236 USHORT QB_NET::get_num_of_nds()
const 238 return its_num_of_nds;
242 const STRINGY & QB_NET::get_nd_name(
246 return its_nds_p_p[nd_id]->get_name();
250 VOID QB_NET::set_nd_name(
254 its_nds_p_p[nd_id]->set_name(name);
258 VOID QB_NET::set_state_name(
263 its_nds_p_p[nd_id]->set_st_name(row_num, new_name);
267 VOID QB_NET::set_act_sts_of_a_nd(
271 its_nds_p_p[nd_id]->set_active_states(act_sts);
275 VOID QB_NET::activate_a_nd_state(
279 its_nds_p_p[nd_id]->activate_state(st_id);
283 USHORT QB_NET::get_degen_of_a_nd(
286 return its_nds_p_p[nd_id]->get_degen();
290 USHORT QB_NET::get_num_of_bi_nds()
292 return its_bi_nds.get_len();
296 BI_NODE * QB_NET::get_bi_nd_ptr(USHORT loc)
298 return &(its_bi_nds[loc]);
304 return *its_nd_name_dict_p;
309 VOID QB_NET::do_mini_run(
311 USHORT & num_of_stories)
327 #ifdef _mac_gui_app //''''''''''''''''''''''''''''''''''''''''''''\\. 331 ND_CLASS_ID QB_NET::get_nd_class_id(
335 return its_nds_p_p[nd_id]->get_class_id();
339 STRINGY QB_NET::get_nd_class_str(
343 return its_nds_p_p[nd_id]->get_class_str();
349 return its_arrows.get_first_p();
353 USHORT QB_NET::get_num_of_arrows()
355 return its_arrows.get_len();
359 const RUN_STATE QB_NET::get_run_state()
const 361 return its_run_state;
365 VOID QB_NET::set_run_state( RUN_STATE state)
367 its_run_state = state;
373 return its_anthology.get_first_p();
377 USHORT QB_NET::get_anthology_len()
379 return its_anthology.get_len();
381 #endif //_mac_gui_app \\............................................// Definition: C_MAIN_VIEW.h:24
Definition: MY_FSTREAMS.h:35
Definition: DICTIONARY.h:15
Definition: C_PORT_RELATED.h:54
Definition: MY_FSTREAMS.h:14
Definition: C_PORT_RELATED.h:6