mirror of
				https://github.com/gonum/gonum.git
				synced 2025-10-31 02:26:59 +08:00 
			
		
		
		
	graph: replace custom reverse logic with slices.Reverse
This commit is contained in:
		 Jonathan Bluett-Duncan
					Jonathan Bluett-Duncan
				
			
				
					committed by
					
						 Dan Kortschak
						Dan Kortschak
					
				
			
			
				
	
			
			
			 Dan Kortschak
						Dan Kortschak
					
				
			
						parent
						
							1f5b2b5b54
						
					
				
				
					commit
					b94e4828e9
				
			| @@ -214,12 +214,6 @@ type moveStructures struct { | ||||
| 	tol        float64 | ||||
| } | ||||
|  | ||||
| func reverse(f []float64) { | ||||
| 	for i, j := 0, len(f)-1; i < j; i, j = i+1, j-1 { | ||||
| 		f[i], f[j] = f[j], f[i] | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func hasNegative(f []float64) bool { | ||||
| 	for _, v := range f { | ||||
| 		if v < 0 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user