DotRange performs the dot product between a vector and another using a range of elements.
(b *Record, start uint, end uint)
| 78 | |
| 79 | // DotRange performs the dot product between a vector and another using a range of elements. |
| 80 | func (w *Record) DotRange(b *Record, start uint, end uint) float64 { |
| 81 | elems := int(end - start) |
| 82 | aRange := backend.Wrap(elems, w.record.Data[start:end]) |
| 83 | bRange := backend.Wrap(elems, b.record.Data[start:end]) |
| 84 | return backend.Dot(aRange, bRange) |
| 85 | } |
| 86 | |
| 87 | // DotSub performs the dot product between a vector and another using up until the specificed number of elements. |
| 88 | func (w *Record) DotSub(b *Record, elems uint) float64 { |
no test coverage detected