state

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clusterer added in v1.10.0

type Clusterer interface {
	AddMatch(frameID1 int, frameID2 int) // Add a pair of matched frames
	Groups() [][]int                     // Return the list of created groups
	DebugDump(writer *bufio.Writer)      // Dump the state
}

func NewClusterer added in v1.10.0

func NewClusterer(method ClusteringMethod) Clusterer

type ClusteringMethod added in v1.10.0

type ClusteringMethod int
const (
	// No clustering is done. Each pair is a separate group.
	None ClusteringMethod = iota
	// Only combine elements into a group if all elements match pairwise.
	Strict
	// Union of matched frames. As long as A ^ B and B ^ C, then A, B, C are combined in the same group.
	Loose
)

type State

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

func MakeState

func MakeState() *State

func (*State) AddFrameIDPersistent

func (state *State) AddFrameIDPersistent(path string) (int, bool)

func (*State) Close

func (state *State) Close()

func (*State) CompactDataStore added in v1.1.0

func (state *State) CompactDataStore() error

func (*State) DebugDump

func (state *State) DebugDump()

func (*State) DeleteFile

func (state *State) DeleteFile(path string)

func (*State) Dump added in v1.3.0

func (state *State) Dump(writer *bufio.Writer) error

func (*State) GetComparisonScore

func (state *State) GetComparisonScore(frameID1 int, frameID2 int) (float32, bool)

func (*State) GetFileFrameIDPersistent

func (state *State) GetFileFrameIDPersistent(path string) (int, bool)

func (*State) GetFrameFileName

func (state *State) GetFrameFileName(frameID int) string

func (*State) GetImageFile

func (state *State) GetImageFile(frameID int) (string, bool)

func (*State) GetframeID

func (state *State) GetframeID(path string) (int, bool)

func (*State) Init

func (state *State) Init(stateDirectory string, logger *logrus.Logger, scorePrefix string) error

func (*State) RegisterFile

func (state *State) RegisterFile(path string) (int, bool)

func (*State) SetComparisonScore

func (state *State) SetComparisonScore(frameID1 int, frameID2 int, score float32)

func (*State) SetframeID

func (state *State) SetframeID(path string, frameID int)

func (*State) UnmatchFrames

func (state *State) UnmatchFrames(frameID1, frameID2 int, falsePositive bool)

type StrictClusterer added in v1.10.0

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

func (*StrictClusterer) AddMatch added in v1.10.0

func (clr *StrictClusterer) AddMatch(frameID1 int, frameID2 int)

func (*StrictClusterer) DebugDump added in v1.10.0

func (clr *StrictClusterer) DebugDump(writer *bufio.Writer)

func (*StrictClusterer) Groups added in v1.10.0

func (clr *StrictClusterer) Groups() [][]int

type TrivialClusterer added in v1.10.0

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

func (*TrivialClusterer) AddMatch added in v1.10.0

func (clr *TrivialClusterer) AddMatch(frameID1 int, frameID2 int)

func (*TrivialClusterer) DebugDump added in v1.10.0

func (clr *TrivialClusterer) DebugDump(writer *bufio.Writer)

func (*TrivialClusterer) Groups added in v1.10.0

func (clr *TrivialClusterer) Groups() [][]int

type UnionClusterer added in v1.10.0

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

func (*UnionClusterer) AddMatch added in v1.10.0

func (clr *UnionClusterer) AddMatch(frameID1 int, frameID2 int)

func (*UnionClusterer) DebugDump added in v1.10.0

func (clr *UnionClusterer) DebugDump(writer *bufio.Writer)

func (*UnionClusterer) Groups added in v1.10.0

func (clr *UnionClusterer) Groups() [][]int

Jump to

Keyboard shortcuts

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