36 typedef std::map<std::string, int> qn_map_type;
37 assert(all_conserved_qn.size() == 1);
38 qn_map_type::const_iterator it = all_conserved_qn.begin();
39 int tmp = alps::evaluate<double>(
static_cast<std::string
>(parms[it->first+
"_total"]), parms);
40 if (!(tmp == 0 || tmp == 1))
41 throw std::runtime_error(
"Invalid value for " + it->first +
"_total");
47 std::map<std::string, int>
const& all_conserved_qn)
49 typedef std::map<std::string, int> qn_map_type;
51 for (
typename alps::SiteBasisDescriptor<short>::const_iterator it = b.begin(); it != b.end(); ++it) {
52 qn_map_type::const_iterator match = all_conserved_qn.find(it->name());
53 if (match != all_conserved_qn.end())
Ztwo::charge init_charge< Ztwo >(const alps::Parameters &parms, std::map< std::string, int > const &all_conserved_qn)
int to_integer(alps::half_integer< T > const &qn_value)
Ztwo::charge state_to_charge< Ztwo >(alps::site_state< short > const &state, alps::SiteBasisDescriptor< short > const &b, std::map< std::string, int > const &all_conserved_qn)