Message boards :
Number crunching :
How is granted credit is determined
Message board moderation
Author | Message |
---|---|
Tetsuji Maverick Rai Send message Joined: 25 Apr 99 Posts: 518 Credit: 90,863 RAC: 0 |
I found a code to determine the granted credit from 2 or more valid credits. It's self-explanatory and easy to read. this code see below // the granted credit is the average of claimed credits // of valid results, discarding the largest and smallest line and you'll understand. (sorry I don't know how to put the code in this message board. It's displayed in a strange format.) Luckiest in the world. WMD = Weapon of Mass Distraction. Click this table. |
Digitalis Send message Joined: 24 Jul 99 Posts: 93 Credit: 85,678 RAC: 0 |
I found a code to determine the granted credit from 2 or more valid credits. Like this? // the granted credit is the average of claimed credits // of valid results, discarding the largest and smallest // if (nvalid == 2) { granted_credit = min_credit; } else { // Take care of case where all claimed credits are equal. if (max_credit == min_credit) { granted_credit = min_credit; } else { sum = 0; for (k=0; k Well I started out thinking "this will be easy" but for some reason if I try to post anything beyond the final k it gets truncated and the formatting is lost. A problem with the forum I think. |
Paul D. Buck Send message Joined: 19 Jul 00 Posts: 3898 Credit: 1,158,042 RAC: 0 |
use "<pre>" and you also have to convert all the < and > into < and > // the granted credit is the average of claimed credits // of valid results, discarding the largest and smallest // if (nvalid == 2) { granted_credit = min_credit; } else { // Take care of case where all claimed credits are equal. if (max_credit == min_credit) { granted_credit = min_credit; } else { sum = 0; for (k=0; k<results.size(); k++) { if (!sah_results[k].have_result) continue; if (results[k].validate_state != VALIDATE_STATE_VALID) continue; if (k == max_credit_i) continue; if (k == min_credit_i) continue; sum += results[k].claimed_credit; } granted_credit = sum/(nvalid-2); } } for (k=0; k<results.size(); k++) { if (results[k].validate_state == VALIDATE_STATE_VALID) { results[k].granted_credit = granted_credit; } } } else { canonicalid = 0; } retval = 0; return_retval: return retval; } |
Tetsuji Maverick Rai Send message Joined: 25 Apr 99 Posts: 518 Credit: 90,863 RAC: 0 |
use "<pre>" and you also have to convert all the < and > into < and > Thanks. This is what I wanted to quote :) This describes how to calculate granted credits, except that this doesn't tell what triggers this caluculation; When only 2 valid results are present, the lowest is granted. When 3 valid results are present, the highest and the lowest credits are discarded, and the middle value is granted. When 4 or more valid results are present (for ex, after long outage, many results have been waiting for validation), the highest and the lowest values are discarded, and the average of the other claimed credits is granted. Precisely speaking, calculation is the same either when 3 valid results are present or when 4 or more valid resuls are present. I think I have understood, YES, I must have understood!! :) Luckiest in the world. WMD = Weapon of Mass Distraction. Click this table. |
Paul D. Buck Send message Joined: 19 Jul 00 Posts: 3898 Credit: 1,158,042 RAC: 0 |
I think I said that in the Wiki ... I will have to try to remember to look at it tomorrow to see if we are that clear as that is what it is ... |
©2024 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.