1 // This file is part of BOINC.
2 // http://boinc.berkeley.edu
3 // Copyright (C) 2008 University of California
5 // BOINC is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU Lesser General Public License
7 // as published by the Free Software Foundation,
8 // either version 3 of the License, or (at your option) any later version.
10 // BOINC is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 // See the GNU Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with BOINC. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef H_VALIDATE_UTIL
19 #define H_VALIDATE_UTIL
27 // bit of a misnomer - this actually taken from the <file_ref> elements
28 // of result.xml_doc_in
36 int parse(XML_PARSER&);
39 extern int get_output_file_info(RESULT& result, FILE_INFO&);
40 extern int get_output_file_infos(RESULT& result, std::vector<FILE_INFO>&);
41 extern int get_output_file_path(RESULT& result, std::string&);
42 extern int get_output_file_paths(RESULT& result, std::vector<std::string>&);
43 extern int get_logical_name(
44 RESULT& result, std::string& path, std::string& name
47 extern double median_mean_credit(WORKUNIT&, std::vector<RESULT>& results);
48 extern int get_credit_from_wu(WORKUNIT&, std::vector<RESULT>& results, double&);
49 extern double stddev_credit(WORKUNIT&, std::vector<RESULT>& results);
50 extern double two_credit(WORKUNIT&, std::vector<RESULT>& results);
51 extern int update_credit_per_cpu_sec(
52 double credit, double cpu_time, double& credit_per_cpu_sec