void Hero_Info_Detail::reset(void) { hero_id = 0; fight_date = 0; hero_index = 0; hero_facade_id = 0; hero_name.clear(); is_fighter = 0; level = 0; formation = 0; awake_lvl = 0; exp = 0.0; CLEAR_VECTOR(std::vector<Int_Double>, prop_value); artifacts.clear(); is_outer = 0; is_task_tmp_hero = false; intimacy_lv = 1; intimacy_exp = 0; community_times = 0; gift_times = 0; assist_skill.reset(); hero_fighter_detail.reset(); suit_cnt_map.clear(); }
void Heroer_Detail::reset(void) { role_id = 0; outer_index = 0; fighter_index = 0; last_fighter_idx = 0; hero_assist_map.clear(); hero_map.clear(); hero_base_detail_.reset(); fight_hero_base_.reset(); logic_status_detail_.reset(); out_status_timepri_list.clear(); status_pro_val.clear(); status_pro_val_per.clear(); buff_scene_status.clear(); clicked_new_heros.clear(); hero_rune_pro_val.clear(); CLEAR_VECTOR(std::vector<Panal_Hero_Tag>, panal_hero_tags); is_change = false; }
/* Importance Sampling */ int4 mu_size_impsample(glist *gl_ptr, int4 M, int4 seed) { boolean_t tn_aborted; double a[MAX_BT_DEPTH + 1]; /* a[j] is # of adjacent block pointers in level j block of cur traversal */ double r[MAX_BT_DEPTH + 1]; /* r[j] is #records in level j block of current traversal */ enum cdb_sc status; int k, h; stat_t rstat; trans_num ret_tn; unsigned int lcl_t_tries; DCL_THREADGBL_ACCESS; SETUP_THREADGBL_ACCESS; inctn_opcode = inctn_invalid_op; /* set gv_target/gv_currkey/gv_cur_region/cs_addrs/cs_data to correspond to <globalname,reg> in gl_ptr */ DO_OP_GVNAME(gl_ptr); if (0 == gv_target->root) { /* Global does not exist (online rollback). Not an error. */ gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_GBLNOEXIST, 2, GNAME(gl_ptr).len, GNAME(gl_ptr).addr); return EXIT_NRM; } if (!seed) seed = (int4)(time(0) * process_id); srand48(seed); /* do M random traversals */ INIT_STATS(rstat); for (k = 1; k <= M; k++) { if (mu_ctrlc_occurred || mu_ctrly_occurred) return EXIT_ERR; t_begin(ERR_MUSIZEFAIL, 0); for (;;) { CLEAR_VECTOR(r); CLEAR_VECTOR(a); if (cdb_sc_normal != (status = mu_size_rand_traverse(r, a))) /* WARNING: assignment */ { assert((CDB_STAGNATE > t_tries) || IS_FINAL_RETRY_CODE(status)); t_retry(status); continue; } gv_target->clue.end = 0; gv_target->hist.h[0] = gv_target->hist.h[1]; /* No level 0 block to validate */ DEBUG_ONLY(lcl_t_tries = t_tries); if ((trans_num)0 == (ret_tn = t_end(&gv_target->hist, NULL, TN_NOT_SPECIFIED))) /* WARNING: assignment */ { ABORT_TRANS_IF_GBL_EXIST_NOMORE(lcl_t_tries, tn_aborted); if (tn_aborted) { /* Global does not exist (online rollback). Not an error. */ gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_GBLNOEXIST, 2, GNAME(gl_ptr).len, GNAME(gl_ptr).addr); return EXIT_NRM; } continue; } accum_stats_impsmpl(&rstat, r, a); break; } } finalize_stats_impsmpl(&rstat); /* display rstat data * Showing the error as 2 standard deviations which is a 95% confidence interval for the * mean number of blocks at each level */ util_out_print("Number of generated samples = !UL", FLUSH, rstat.n); util_out_print("Level Blocks Adjacent 2 sigma(+/-)", FLUSH); for (h = MAX_BT_DEPTH; (0 <= h) && (rstat.blktot[h] < EPS); h--); for ( ; h > 0; h--) util_out_print("!5UL !15UL !15UL !15UL ~ !3UL%", FLUSH, h, (int)ROUND(rstat.blktot[h]), (int)ROUND(mu_int_adj[h]), (int)ROUND(sqrt(rstat.blkerr[h]) * 2), (int)ROUND(sqrt(rstat.blkerr[h]) * 2 / rstat.blktot[h] * 100.0) ); util_out_print("!5UL !15UL !15UL !15UL ~ !3UL%", FLUSH, h, (int)ROUND(rstat.blktot[h]), (int)ROUND(mu_int_adj[h]), (int)ROUND(sqrt(rstat.blkerr[h]) * 2), (int)ROUND(sqrt(rstat.blkerr[h]) * 2 / rstat.blktot[h] * 100.0) ); util_out_print("Total !15UL !15UL !15UL ~ !3UL%", FLUSH, (int)ROUND(rstat.B), (int)ROUND(rstat.AT), (int)ROUND(sqrt(rstat.error) * 2), (int)ROUND(sqrt(rstat.error) * 2 / rstat.B * 100.0) ); return EXIT_NRM; }
void Public_Detail::reset(void) { role_id = 0; local_his.clear(); plot_id.clear(); plot_step = 0; plot_info.clear(); plot_switch = false; add_up_online_time = 0; fcm = 1; war_enter_num = 0; war_merit = 0; merit = 0; war_forbid_time = Time_Value::zero; add_campfire = 0; campfire_id = 0; campfire_finish_time = 0; campfire_rank = 0; killed_match_man.clear(); campfire_lighter = 0; campfire_recieve_stat = 0; campfire_rank_rev_stat = 0; war_result = 0; war_rank = 0; war_kill_num = 0; war_coe = 0; guide_num_map.clear(); played_plot_set.clear(); guide_step_map.clear(); is_total_open = 0; is_open_music = 0; music_num = 0; is_open_voice = 0; voice_num = 0; is_hide_role_model = 0; is_hide_hero_model = 0; is_hide_title = 0; player_count = 0; is_skip_plot = 0; awake_lvl = 0; artifacts.clear(); fornotice_gifts_status.clear(); exploit_val = 0; exploit_lvl = 0; CLEAR_VECTOR(std::vector<Flowers_Info>, flowers_info_vec); first_recharge = 0; two_recharge = 0; limit_time_recharge = 0; last_two_recharge_stime = Time_Value::zero; last_limit_time_recharge_stime = Time_Value::zero; recharge_feedback_receive_list.clear(); recharge_money = 0; last_recharge_rebate_stime = Time_Value::zero; recharge_money_his = 0; recharge_activities_last_time = Time_Value::zero; recharge_activities_money = 0; recharge_activities_receive_id.clear(); notice_id = 0; is_played_effect = false; is_show = false; is_receive_old_player_gift = false; today_rec_bind_gold = 0; is_receive_like_reward = false; ans_qid.clear(); inv_time = Time_Value::zero; //最后一次分享成功时间 rec_inv_time = Time_Value::zero; //最后一次领取分享时间 is_receive_inv_ones = false;//是否已经领取过一次性奖励 is_magic_wing_over_time = false; is_magic_wing_readed = false; vip_over_time = Time_Value::zero; is_vip_readed = false; genius_over_time = Time_Value::zero; is_genius_readed = false; task_guide_id = 0; friendship_accumulate = 0; vip_upgrade_cards_ = 0; start_frist_recharge_time = Time_Value::gettimeofday(); arena_worship_times = 0; }
int4 mu_size_arsample(mval *gn, uint4 M, boolean_t ar, int seed) { enum cdb_sc status; trans_num ret_tn; int k, h; boolean_t verify_reads; boolean_t tn_aborted; unsigned int lcl_t_tries; double r[MAX_BT_DEPTH + 1]; /* r[j] is #records in level j block of current traversal */ stat_t rstat, ustat; DCL_THREADGBL_ACCESS; SETUP_THREADGBL_ACCESS; inctn_opcode = inctn_invalid_op; op_gvname(VARLSTCNT(1) gn); if (0 == gv_target->root) { /* Global does not exist (online rollback). Not an error. */ gtm_putmsg(VARLSTCNT(4) ERR_GBLNOEXIST, 2, gn->str.len, gn->str.addr); return EXIT_NRM; } if (!seed) seed = (int4)(time(0) * process_id); srand48(seed); /* do random traversals until M of them are accepted at level 1 */ INIT_STATS(rstat); for (k = 1; rstat.N[1] < M; k++) { if (mu_ctrlc_occurred || mu_ctrly_occurred) return EXIT_ERR; t_begin(ERR_MUSIZEFAIL, 0); for (;;) { CLEAR_VECTOR(r); if (cdb_sc_normal != (status = rand_traverse(r))) { assert(CDB_STAGNATE > t_tries); t_retry(status); continue; } gv_target->clue.end = 0; gv_target->hist.h[0] = gv_target->hist.h[1]; /* No level 0 block to validate */ DEBUG_ONLY(lcl_t_tries = t_tries); if ((trans_num)0 == (ret_tn = t_end(&gv_target->hist, NULL, TN_NOT_SPECIFIED))) { ABORT_TRANS_IF_GBL_EXIST_NOMORE(lcl_t_tries, tn_aborted); if (tn_aborted) { /* Global does not exist (online rollback). Not an error. */ gtm_putmsg(VARLSTCNT(4) ERR_GBLNOEXIST, 2, gn->str.len, gn->str.addr); return EXIT_NRM; } continue; } accum_stats_ar(&rstat, r, ar); break; } } finalize_stats_ar(&rstat, ar); /* display rstat data */ /* Showing the error as 2 standard deviations which is a 95% confidence interval for the mean number of blocks at * each level*/ util_out_print("!/Number of generated samples = !UL", FLUSH, rstat.n); util_out_print("Number of accepted samples = !UL", FLUSH, rstat.N[1]); util_out_print("Level Blocks 2 sigma(+/-) % Accepted", FLUSH); for (h = MAX_BT_DEPTH; (h >= 0) && (rstat.blktot[h] < EPS); h--); for ( ; h > 0; h--) util_out_print("!5UL !15UL !15UL ~ !3UL% !15UL", FLUSH, h, (int)ROUND(rstat.blktot[h]), (int)ROUND(sqrt(rstat.blkerr[h])*2), (int)ROUND(sqrt(rstat.blkerr[h])*2/rstat.blktot[h]*100), (int)ROUND(100.0*rstat.N[h]/rstat.n) ); util_out_print("!5UL !15UL !15UL ~ !3UL% N/A", FLUSH, h, (int)ROUND(rstat.blktot[h]), (int)ROUND(sqrt(rstat.blkerr[h])*2), (int)ROUND(sqrt(rstat.blkerr[h])*2/rstat.blktot[h]*100.0) ); util_out_print("Total !15UL !15UL ~ !3UL% N/A", FLUSH, (int)ROUND(rstat.B), (int)ROUND(sqrt(rstat.error)*2), (int)ROUND(sqrt(rstat.error)*2/rstat.B*100.0) ); return EXIT_NRM; }
void Annoucement::reset() { district = 0; announce_id = 0; CLEAR_VECTOR(Role_Vec, recievers); CLEAR_VECTOR(std::vector<Chat_Content>, ann_contents); }