defaultcapacity

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: MIT Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaxLimit added in v0.8.3

func MaxLimit(wholeLength int, limit int) int

MaxLimit

returns

  • limit: -1, returns predictive length based on wholeLength (max 100)
  • limit: >= 0, returns limit if limit < wholeLength or else returns wholeLength

func OfSearch

func OfSearch(length int) int

func OfSplits

func OfSplits(wholeLength int, limit int) int

OfSplits

returns

  • limit: -1, returns predictive length based on wholeLength (max 100)
  • limit: >= 0, returns limit if limit < wholeLength or else returns predictive length based on wholeLength (max 100)

func Predictive added in v0.4.0

func Predictive(
	possibleLen int,
	multiplier float64,
	additionalCap int,
) int

Predictive Result must be positive possibleLen * multiplier + additionalCap.

Less than zero yields additionalCap

func PredictiveDefault added in v0.4.1

func PredictiveDefault(possibleLen int) int

PredictiveDefault Result must be positive possibleLen * multiplier + constants.ArbitraryCapacity50.

Less than zero yields constants.ArbitraryCapacity50

func PredictiveDefaultSmall added in v0.6.2

func PredictiveDefaultSmall(possibleLen int) int

func PredictiveFiftyPercentIncrement added in v0.4.0

func PredictiveFiftyPercentIncrement(possibleLen int, additionalCap int) int

PredictiveFiftyPercentIncrement Result must be positive possibleLen * multiplier + additionalCap.

Less than zero yields additionalCap

Types

This section is empty.

Jump to

Keyboard shortcuts

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