Documentation ¶
Index ¶
- Constants
- type Constant
- type Generator
- type Normal
- type Number
- type Pareto
- type ProbabilitySlice
- func (dist ProbabilitySlice) ApplyToFloat64(total float64) []float64
- func (dist ProbabilitySlice) ApplyToInt64(total int64) []int64
- func (dist ProbabilitySlice) ApplyToResources(total corev1.ResourceList) v1alpha1.ResourceDistribution
- func (dist ProbabilitySlice) ApplyToTimeline(startingTime metav1.Time, total metav1.Duration) v1alpha1.Timeline
- type Uniform
Constants ¶
View Source
const ( DefaultParetoScale = 1 DefaultParetoShape = 0.1 )
View Source
const (
NormalSigma = 4
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constant ¶ added in v1.0.39
type Constant struct {
Number
}
Constant represents a Constant distribution
func NewConstant ¶ added in v1.0.39
func NewConstant() *Constant
NewConstant creates a new Constant distribution.
type Normal ¶ added in v1.0.37
Normal represents a normal (Gaussian) distribution (https://en.wikipedia.org/wiki/Normal_distribution).
type Number ¶ added in v1.0.37
type Number struct {
LastValue float64
}
Number is a common generator.
func (*Number) SetLastValue ¶ added in v1.0.37
SetLastValue sets the last value generated.
type Pareto ¶ added in v1.0.37
Pareto implements the Pareto (Type I) distribution
type ProbabilitySlice ¶ added in v1.0.37
type ProbabilitySlice []float64
ProbabilitySlice provides the value of the probability density function at x.
func GenerateProbabilitySliceFromSpec ¶ added in v1.0.37
func GenerateProbabilitySliceFromSpec(samples int64, spec *v1alpha1.DistributionSpec) ProbabilitySlice
func (ProbabilitySlice) ApplyToFloat64 ¶ added in v1.0.37
func (dist ProbabilitySlice) ApplyToFloat64(total float64) []float64
func (ProbabilitySlice) ApplyToInt64 ¶ added in v1.0.37
func (dist ProbabilitySlice) ApplyToInt64(total int64) []int64
func (ProbabilitySlice) ApplyToResources ¶ added in v1.0.37
func (dist ProbabilitySlice) ApplyToResources(total corev1.ResourceList) v1alpha1.ResourceDistribution
func (ProbabilitySlice) ApplyToTimeline ¶ added in v1.0.37
type Uniform ¶ added in v1.0.37
Uniform represents a continuous uniform distribution (https://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29).
func NewUniform ¶ added in v1.0.37
NewUniform creates a new Uniform distribution.
Click to show internal directories.
Click to hide internal directories.