Documentation ¶
Index ¶
- func DotProductGo(a, b []float32) float32
- func Normalize(v []float32) []float32
- type CosineDistance
- type CosineDistanceProvider
- type Distancer
- type DotProduct
- type DotProductProvider
- type GeoDistancer
- type GeoProvider
- type Hamming
- type HammingProvider
- type L2Squared
- type L2SquaredProvider
- type Manhattan
- type ManhattanProvider
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DotProductGo ¶
Types ¶
type CosineDistance ¶
type CosineDistance struct {
// contains filtered or unexported fields
}
type CosineDistanceProvider ¶
type CosineDistanceProvider struct{}
func NewCosineDistanceProvider ¶
func NewCosineDistanceProvider() CosineDistanceProvider
func (CosineDistanceProvider) New ¶
func (d CosineDistanceProvider) New(a []float32) Distancer
func (CosineDistanceProvider) SingleDist ¶
func (d CosineDistanceProvider) SingleDist(a, b []float32) (float32, bool, error)
func (CosineDistanceProvider) Type ¶
func (d CosineDistanceProvider) Type() string
type DotProduct ¶
type DotProduct struct {
// contains filtered or unexported fields
}
type DotProductProvider ¶
type DotProductProvider struct{}
func NewDotProductProvider ¶
func NewDotProductProvider() DotProductProvider
func (DotProductProvider) New ¶
func (d DotProductProvider) New(a []float32) Distancer
func (DotProductProvider) SingleDist ¶
func (d DotProductProvider) SingleDist(a, b []float32) (float32, bool, error)
func (DotProductProvider) Type ¶
func (d DotProductProvider) Type() string
type GeoDistancer ¶
type GeoDistancer struct {
// contains filtered or unexported fields
}
type GeoProvider ¶
type GeoProvider struct{}
func (GeoProvider) New ¶
func (p GeoProvider) New(vec []float32) Distancer
func (GeoProvider) SingleDist ¶
func (p GeoProvider) SingleDist(vec1, vec2 []float32) (float32, bool, error)
func (GeoProvider) Type ¶
func (p GeoProvider) Type() string
type HammingProvider ¶
type HammingProvider struct{}
func NewHammingProvider ¶
func NewHammingProvider() HammingProvider
func (HammingProvider) New ¶
func (l HammingProvider) New(a []float32) Distancer
func (HammingProvider) SingleDist ¶
func (l HammingProvider) SingleDist(a, b []float32) (float32, bool, error)
func (HammingProvider) Type ¶
func (l HammingProvider) Type() string
type L2SquaredProvider ¶
type L2SquaredProvider struct{}
func NewL2SquaredProvider ¶
func NewL2SquaredProvider() L2SquaredProvider
func (L2SquaredProvider) New ¶
func (l L2SquaredProvider) New(a []float32) Distancer
func (L2SquaredProvider) SingleDist ¶
func (l L2SquaredProvider) SingleDist(a, b []float32) (float32, bool, error)
func (L2SquaredProvider) Type ¶
func (l L2SquaredProvider) Type() string
type ManhattanProvider ¶
type ManhattanProvider struct{}
func NewManhattanProvider ¶
func NewManhattanProvider() ManhattanProvider
func (ManhattanProvider) New ¶
func (l ManhattanProvider) New(a []float32) Distancer
func (ManhattanProvider) SingleDist ¶
func (l ManhattanProvider) SingleDist(a, b []float32) (float32, bool, error)
func (ManhattanProvider) Type ¶
func (l ManhattanProvider) Type() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.