| 
														
															@@ -1,11 +1,15 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 #include "lastseen.h" 
														 | 
														
														 | 
														
															 #include "lastseen.h" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-LastSeen::LastSeen(int max) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+// Initialized tracker with max count of item -1. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+LastSeen::LastSeen(int max) : tracker(max, -1) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   this->max = max; 
														 | 
														
														 | 
														
															   this->max = max; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   tracker.reserve(max); 
														 | 
														
														 | 
														
															   tracker.reserve(max); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  /* 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   while ((int)tracker.size() < max) 
														 | 
														
														 | 
														
															   while ((int)tracker.size() < max) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       tracker.insert(tracker.begin(), -1); 
														 | 
														
														 | 
														
															       tracker.insert(tracker.begin(), -1); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 /* 
														 | 
														
														 | 
														
															 /* 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -15,14 +19,12 @@ int LastSeen::bestsize(int max_items) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 */ 
														 | 
														
														 | 
														
															 */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-int LastSeen::getmax(void) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  return this->max; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+int LastSeen::getmax(void) { return this->max; } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-LastSeen::~LastSeen() {  }; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+LastSeen::~LastSeen(){}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 bool LastSeen::seen_before(int this_one) { 
														 | 
														
														 | 
														
															 bool LastSeen::seen_before(int this_one) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  for (auto it = this->tracker.begin(); it != this->tracker.end(); ++it ) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  for (auto it = this->tracker.begin(); it != this->tracker.end(); ++it) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     if (*it == this_one) 
														 | 
														
														 | 
														
															     if (*it == this_one) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       return true; 
														 | 
														
														 | 
														
															       return true; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -33,6 +35,4 @@ bool LastSeen::seen_before(int this_one) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   return false; 
														 | 
														
														 | 
														
															   return false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-int LastSeen::best_guess(int max) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  return max / 2; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+int LastSeen::best_guess(int max) { return max / 2; } 
														 |