void copy(const midpoint_eval_data_mp & other) { SolverMultiplePrecision::copy(other); this->num_mid_vars = other.num_mid_vars; this->num_top_vars = other.num_top_vars; this->num_bottom_vars = other.num_bottom_vars; this->bottom_memory = other.bottom_memory; this->top_memory = other.top_memory; this->mid_memory = other.mid_memory; this->SLP_mid = other.SLP_mid; this->SLP_top = other.SLP_top; this->SLP_bottom = other.SLP_bottom; for (int ii=0; ii<other.num_projections; ii++) { if (other.MPType==2) { add_projection(other.pi_full_prec[ii]); } else{ add_projection(other.pi[ii]); } } //patch already lives in the base class. set_mp(v_target,other.v_target); set_mp(u_target,other.u_target); randomizer_bottom = other.randomizer_bottom; randomizer_top = other.randomizer_top; set_mp(crit_val_left,other.crit_val_left); set_mp(crit_val_right,other.crit_val_right); set_mp(u_start, other.u_start); set_mp(v_start, other.v_start); if (this->MPType==2) { set_mp(v_target_full_prec,other.v_target_full_prec); set_mp(u_target_full_prec,other.u_target_full_prec); set_mp(crit_val_left_full_prec,other.crit_val_left_full_prec); set_mp(crit_val_right_full_prec,other.crit_val_right_full_prec); set_mp(u_start_full_prec, other.u_start_full_prec); set_mp(v_start_full_prec, other.v_start_full_prec); } } // re: copy
void copy(const MidpointConfiguration & other){ this->MPType = other.MPType; this->systems = other.systems; system_name_mid = other.system_name_mid; system_name_top = other.system_name_top; system_name_bottom = other.system_name_bottom; set_mp(v_target,other.v_target); set_mp(u_target,other.u_target); set_mp(crit_val_left,other.crit_val_left); set_mp(crit_val_right,other.crit_val_right); for (int ii=0; ii<other.num_projections; ii++) { add_projection(other.pi[ii]); } }
/** set the current projection. \return the index of the projection \param new_proj the projection to set as current */ int set_curr_projection(vec_mp new_proj){ int proj_index = get_proj_index(new_proj); if (proj_index==-1) { int init_size = new_proj->size; new_proj->size = this->num_natural_variables_; proj_index = add_projection(new_proj); new_proj->size = init_size; } curr_projection_ = proj_index; // std::cout << "curr_projection is now: " << curr_projection << std::endl; return proj_index; }
void copy(const midpoint_eval_data_d & other) { SolverDoublePrecision::copy(other); this->num_mid_vars = other.num_mid_vars; this->num_top_vars = other.num_top_vars; this->num_bottom_vars = other.num_bottom_vars; this->top_memory = other.top_memory; this->bottom_memory = other.bottom_memory; this->mid_memory = other.mid_memory; this->SLP_bottom = other.SLP_bottom; this->SLP_mid = other.SLP_mid; this->SLP_top = other.SLP_top; for (int ii=0; ii<other.num_projections; ii++) { add_projection(other.pi[ii]); } //patch already lives in the base class. set_d(v_target,other.v_target); set_d(u_target,other.u_target); randomizer_bottom = other.randomizer_bottom; randomizer_top = other.randomizer_top; set_d(crit_val_left,other.crit_val_left); set_d(crit_val_right,other.crit_val_right); set_d(u_start, other.u_start); set_d(v_start, other.v_start); }