From e778c16651be27559e0c5a5157dd10d0f5a20242 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Mon, 13 Aug 2007 07:21:17 +0000 Subject: [PATCH] calculate the avg score for the model --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.39.2