distributions

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	Next(r *rand.Rand) int64
	Last() int64
}

type PointDistribution

type PointDistribution []float64

func GetPointDistribution

func GetPointDistribution(nodes int64, spec *v1alpha1.DistributionSpec) PointDistribution

func NewPointDistribution

func NewPointDistribution(nodes int64, distgenerator Generator) PointDistribution

func (PointDistribution) ApplyToFloat64

func (dist PointDistribution) ApplyToFloat64(total float64) []float64

func (PointDistribution) ApplyToInt64

func (dist PointDistribution) ApplyToInt64(total int64) []int64

func (PointDistribution) ApplyToResources

func (dist PointDistribution) ApplyToResources(total corev1.ResourceList) v1alpha1.ResourceDistribution

func (PointDistribution) ApplyToTimeline

func (dist PointDistribution) ApplyToTimeline(startingTime metav1.Time, total metav1.Duration) v1alpha1.Timeline

Jump to

Keyboard shortcuts

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