MCPcopy Create free account
hub / github.com/evilsocket/sum / DotSub

Method DotSub

wrapper/record.go:88–90  ·  view source on GitHub ↗

DotSub performs the dot product between a vector and another using up until the specificed number of elements.

(b *Record, elems uint)

Source from the content-addressed store, hash-verified

86
87// DotSub performs the dot product between a vector and another using up until the specificed number of elements.
88func (w *Record) DotSub(b *Record, elems uint) float64 {
89 return w.DotRange(b, 0, elems)
90}
91
92// Magnitude returns the magnitude of the vector.
93func (w *Record) Magnitude() float64 {

Callers 1

CosineSubMethod · 0.95

Calls 1

DotRangeMethod · 0.95

Tested by

no test coverage detected