Add response time badge and chart
This commit is contained in:
		
							
								
								
									
										17
									
								
								vendor/github.com/wcharczuk/go-chart/v2/matrix/vector.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								vendor/github.com/wcharczuk/go-chart/v2/matrix/vector.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| package matrix | ||||
|  | ||||
| // Vector is just an array of values. | ||||
| type Vector []float64 | ||||
|  | ||||
| // DotProduct returns the dot product of two vectors. | ||||
| func (v Vector) DotProduct(v2 Vector) (result float64, err error) { | ||||
| 	if len(v) != len(v2) { | ||||
| 		err = ErrDimensionMismatch | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	for i := 0; i < len(v); i++ { | ||||
| 		result = result + (v[i] * v2[i]) | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
		Reference in New Issue
	
	Block a user