From: Michael Andreen Date: Mon, 13 Aug 2007 07:21:17 +0000 (+0000) Subject: calculate the avg score for the model X-Git-Tag: v0.1~29 X-Git-Url: https://ruin.nu/git/?p=germs.git;a=commitdiff_plain;h=e778c16651be27559e0c5a5157dd10d0f5a20242 calculate the avg score for the model --- diff --git a/src/main.cpp b/src/main.cpp index 94109b4..b619429 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -76,9 +76,12 @@ int main(int argc, char** argv){ //TODO: Sort GeneSorter::ActionList al = so.sort(go,model); + double score = 0; for (GeneSorter::ActionList::iterator sa = al.begin(); sa != al.end(); ++sa){ cout << "Action: " << sa->toString() << " model score: " << model.score(*sa,go) << endl; + score += model.score(*sa,go); } + cout << "Avg score: " << score / al.size() << endl; //TODO: Print result return EXIT_SUCCESS; }