pub fn optimize(&mut self, n:u32) -> f64
	{
		if self.items.len() < 1
		{ //no optimization possible without initial item
			panic!("No optimization possible without items!");
		}
		
		for _ in 0..n
		{
			self.populate() //mutation is randomly done on new items after breeding
				.evaluate()
				.sort()
				.survive()
				.sort();
		}
		
		self.get_score()
	}
/// Do n iterations optimizing the items by: 1. breeding 2. mutating 3. evaluating 4. sorting 5. surviving 6. sorting
/// Returns best score after last iteration
Do n iterations optimizing the items by: 1. breeding 2. mutating 3. evaluating 4. sorting 5. surviving 6. sorting
Returns best score after last iteration
Do n iterations optimizing the items by : 1 . breeding 2 . mutating 3 . evaluating 4 . sorting 5 . surviving 6 . sorting Returns best score after last iteration
pub fn optimize(&mut self, n:u32) -> f64
	{
		if self.items.len() < 1
		{ //no optimization possible without initial item
			panic!("No optimization possible without items!");
		}
		for _ in 0..n
		{
			self.populate() //mutation is randomly done on new items after breeding
				.evaluate()
				.sort()
				.survive()
				.sort();
		}
		self.get_score()
	}
pub fn optimize ( & mut self , n : u32 ) -> f64 { if self . items . len ( ) < 1 { //no optimization possible without initial item panic ! ( " " ) ; } for _ in 0 .. n { self . populate ( ) //mutation is randomly done on new items after breeding . evaluate ( ) . sort ( ) . survive ( ) . sort ( ) ; } self . get_score ( ) }
Do n iterations optimizing the items by: 1. breeding 2. mutating 3. evaluating 4. sorting 5. surviving 6. sorting
Returns best score after last iteration
Do n iterations optimizing the items by : 1 . breeding 2 . mutating 3 . evaluating 4 . sorting 5 . surviving 6 . sorting Returns best score after last iteration
&mut self
n
u32
&mut self
n
u32