wheels

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DemandWheel

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

func NewDemandWheel

func NewDemandWheel(initSize int) *DemandWheel

func (*DemandWheel) GetLoad

func (st *DemandWheel) GetLoad(elem int) int64

func (*DemandWheel) Put

func (st *DemandWheel) Put(elem int, load int64, weight float64)

func (*DemandWheel) Remove

func (st *DemandWheel) Remove(elem int)

func (*DemandWheel) Roll

func (st *DemandWheel) Roll(roll float64) int

type StaticWheel

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

func NewStaticWheel

func NewStaticWheel(n int) *StaticWheel

func (*StaticWheel) Roll

func (st *StaticWheel) Roll(roll float64) int

func (*StaticWheel) SetWeight

func (st *StaticWheel) SetWeight(elem int, weight float64)

Jump to

Keyboard shortcuts

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