sieve

package module
v0.0.0-...-71e33cb Latest Latest
Warning

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

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

Documentation

Overview

Example
package main

import (
	"cirello.io/sieve"
)

func main() {
	cache := sieve.New[string](3)
	cache.Access("A")
	cache.Access("B")
	cache.Access("C")
	cache.Access("D")
	cache.Show()

}
Output:

D (Visited: false) -> C (Visited: false) -> B (Visited: false)

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[T comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable](capacity int) *Cache[T]

func (*Cache[T]) Access

func (c *Cache[T]) Access(x T)

func (*Cache[T]) Show

func (self *Cache[T]) Show()

type Node

type Node[T comparable] struct {
	Value T
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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