ALPSCore reference
convergence.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1998-2018 ALPS Collaboration. See COPYRIGHT.TXT
3  * All rights reserved. Use is subject to license terms. See LICENSE.TXT
4  * For use in publications, see ACKNOWLEDGE.TXT
5  */
6 
7 /* $Id: obsvalue.h 3435 2009-11-28 14:45:38Z troyer $ */
8 
9 #pragma once
10 
11 #include <alps/config.hpp>
12 #include <string>
13 
14 namespace alps {
15 
17 
18 template<typename T> inline std::string convergence_to_text(T) {
19  boost::throw_exception(std::logic_error("Not Implemented"));
20  return std::string();
21 }
22 
23 inline std::string convergence_to_text(int c)
24 {
25  return (c==CONVERGED ? "yes" : c==MAYBE_CONVERGED ? "maybe" : c==NOT_CONVERGED ? "no" : "");
26 }
27 
28 } // end namespace alps
29 
error_convergence
Definition: convergence.hpp:16
std::string convergence_to_text(T)
Definition: convergence.hpp:18