lfu

package
v0.0.0-...-5801db9 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FreqList

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

func NewFreqList

func NewFreqList() (fl *FreqList)

type LFU

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

func NewLFU

func NewLFU(capacity int) (lfu *LFU)

func (*LFU) Get

func (lfu *LFU) Get(key string) any

func (*LFU) Put

func (lfu *LFU) Put(key string, val any)

type Node

type Node struct {
	Key   string
	Value any
	Freq  int

	Prev *Node
	Next *Node
}

Jump to

Keyboard shortcuts

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