MCPcopy Create free account
hub / github.com/egonelbre/exp / Add

Method Add

bench/vector/mini/vector_test.go:61–67  ·  view source on GitHub ↗
(b ArrayStruct)

Source from the content-addressed store, hash-verified

59}
60
61func (a ArrayStruct) Add(b ArrayStruct) ArrayStruct {
62 r := ArrayStruct{}
63 for i := 0; i < a.Len(); i++ {
64 r.Set(i, a.At(i)+b.At(i))
65 }
66 return r
67}
68func (a ArrayStruct) Add3(b ArrayStruct) ArrayStruct {
69 r := ArrayStruct{}
70 r.Set(0, a.At(0)+b.At(0))

Callers 1

BenchmarkArrayStructFunction · 0.95

Calls 3

LenMethod · 0.95
SetMethod · 0.95
AtMethod · 0.95

Tested by

no test coverage detected