Changes between Version 4 and Version 5 of ValidationSimple


Ignore:
Timestamp:
May 4, 2007, 9:57:42 AM (17 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ValidationSimple

    v4 v5  
    99    * Zero on success,
    1010    * ERR_OPENDIR if there was a transient error, e.g. the output file is on a network volume that is not available. The validator will try this result again later.
    11     * Any other return value indicates a permanent error. Example: an output file is missing, or has a syntax error. The result will be marked as invalid.
     11    * Any other return value indicates a permanent error. Example: an output file is missing, or has a syntax error. The result will be marked as invalid.
     12
    1213{{{
    1314extern int compare_results(
     
    2324extern double compute_granted_credit(WORKUNIT&, vector<RESULT>& results);
    2425}}}
    25 Given a set of results (at least one of which is valid) compute the credit to be granted to all of them. Normally this function simply returns median_mean_credit(results). If [WorkGeneration credit is specified in the workunit], call get_credit_from_wu().
     26Given a set of results (at least one of which is valid) compute the credit to be granted to all of them. Normally this function simply returns median_mean_credit(wu, results). If [WorkGeneration credit is specified in the workunit], call get_credit_from_wu(wu, results).
    2627
    2728You must link these functions with the files validator.C, validate_util.C, and validate_util2.C. The result is your custom validator.
    28 Example
     29== Example ==
    2930Here's an example in which the output file contains an integer and a double. Two results are considered equivalent if the integer is equal and the doubles differ by no more than 0.01.
    3031
     
    5758    if (retval) return retval;
    5859    n = fscanf(f, "%d %f", &i, &x);
     60    fclose(f);
    5961    if (n != 2) return ERR_XML_PARSE;
    6062    DATA* dp = new DATA;