Add response time badge and chart
This commit is contained in:
1 parent
bab69478dd
commit
470e3a3ebc
140 files changed
+26995
-106
No files matched your search
+17
@@ -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