30 : filename_m(filename)
39 std::ifstream histfile;
41 histfile.open(
filename_m.c_str(), std::ios::in);
50 std::istream_iterator<size_t>
it(histfile);
51 while ( it != std::istream_iterator<size_t>() ) {
58 if (histfile.is_open()) {
71 "Lower index >= upper index: " + std::to_string(lidx) +
72 " >= " + std::to_string(uidx));
77 "Index >= number of bins: " + std::to_string(uidx) +
82 std::advance(beg, lidx);
85 std::advance(end, uidx);
91 "No minimum between " + std::to_string(lower) +
92 " and " + std::to_string(upper) +
" found.");
95 return double(*result);
101 std::getline(ifs, header);
103 if (header.find(
"# Histogram bin counts") == std::string::npos) {
108 const std::regex
re(
"\\.*\\) (.*) mm (.*) mm (.*) (.*) mm");
110 std::regex_search(header, match, re);
112 if ( match.size() != 5 ) {
114 "Error parsing header of file " +
filename_m);
117 rmin_m = getValue<double>(match[1].str());
118 double rmax = getValue<double>(match[2].str());
119 size_t nbins = getValue<size_t>(match[3].str());
120 binwidth_m = getValue<double>(match[4].str());
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two distribute and or modify the software for each author s protection and we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed we want its recipients to know that what they have is not the so that any problems introduced by others will not reflect on the original authors reputations any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent in effect making the program proprietary To prevent we have made it clear that any patent must be licensed for everyone s free use or not licensed at all The precise terms and conditions for distribution and modification follow GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR DISTRIBUTION AND MODIFICATION This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License The refers to any such program or and a work based on the Program means either the Program or any derivative work under copyright a work containing the Program or a portion of it
size_t minimum(double lower, double upper)
std::string filename_m
Histogram file.
clearpage the user may choose between constant or variable radius This model includes fringe fields begin
std::string::iterator iterator
ProbeHistReader(std::string filename)
void parseHeader(std::ifstream &ifs)
MMatrix< double > re(MMatrix< m_complex > mc)