/** * \file FittingSolutionRecord.cpp * \brief stored a multifit fitting solution * * Copyright 2007-2013 IMP Inventors. All rights reserved. * */ #include #include namespace { template void initialize(T &t) { if (std::numeric_limits::has_signaling_NaN) { t= std::numeric_limits::signaling_NaN(); } else if (std::numeric_limits::has_quiet_NaN) { t= std::numeric_limits::quiet_NaN(); } else if (std::numeric_limits::has_infinity) { t= std::numeric_limits::infinity(); } else { // numerical limits for int and double have completely // different meanings of max/min t= std::numeric_limits::max(); } } template bool is_initialized(T &t) { if (std::numeric_limits::has_signaling_NaN) { return !(t == std::numeric_limits::signaling_NaN()); } else if (std::numeric_limits::has_quiet_NaN) { return !(t == std::numeric_limits::quiet_NaN()); } else if (std::numeric_limits::has_infinity) { return !(t == std::numeric_limits::infinity()); } else { // numerical limits for int and double have completely // different meanings of max/min return !(t == (std::numeric_limits::max())); } } } IMPMULTIFIT_BEGIN_NAMESPACE FittingSolutionRecord::FittingSolutionRecord() { index_=0; sol_fn_=""; match_size_=0; match_avg_dist_=-1; fitting_score_=-1; rmsd_to_ref_=-1; env_pen_=-1; fit_transformation_=algebra::get_identity_transformation_3d(); dock_transformation_=algebra::get_identity_transformation_3d(); } void FittingSolutionRecord::show(std::ostream& out) const { //if (is_initialized(index_)) out<