services

package
v0.0.0-...-5aa440a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoding

type Encoding []float64

func NewEncoding

func NewEncoding(encoding string) (Encoding, error)

func (Encoding) GetDist

func (e Encoding) GetDist(otherEncoding Encoding) (float64, error)

GetDist returns L2 (Euclidean) distance between to encodings/vectors TODO should it be method for Encoding, or a helper method in package?

func (Encoding) IsSame

func (e Encoding) IsSame(otherEncoding Encoding) (bool, float64, error)

IsSame checks if encodings are for the same person returns flag, distance, and error

func (Encoding) String

func (e Encoding) String() string

type EncodingComparator

type EncodingComparator struct {
	// contains filtered or unexported fields
}

func NewEncodingComparator

func NewEncodingComparator(persons models.PersonModel) *EncodingComparator

func (*EncodingComparator) FindSamePerson

func (e *EncodingComparator) FindSamePerson(encoding Encoding) (*models.Person, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL