Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Beta4 ¶
Beta4 implements the four-parameter Beta distribution, which is like the two-parameter Beta distribution with ranges between the min and max instead of between 0 and 1.
func (Beta4) Mode ¶
Mode returns the mode of the Beta4 distribution.
Mode returns NaN if both parameters are less than or equal to 1 as a special case, 0 if only Alpha <= 1 and 1 if only Beta <= 1.
func (Beta4) NumParameters ¶
NumParameters returns the number of parameters in the Beta4 distribution.
type Fixed ¶ added in v0.2.0
type Fixed struct {
// contains filtered or unexported fields
}
Fixed is a fixed value regardless of the period.
func NewBeta4One ¶ added in v0.5.0
NewBeta4One creates a new four-parameter Beta distribution one time. Thereafter, the same fixed value is always returned.
func NewPERTOne ¶ added in v0.2.0
NewPERTOne create a new PERT distribution one time. Thereafter, the same fixed value is always returned.
func NewTriangleOne ¶ added in v0.2.0
NewTriangleOne create a new triangle distribution one time with lower linit a, upper limit b, and mode c. Thereafter, the same fixed value is always returned.
type PERT ¶
type PERT struct {
// contains filtered or unexported fields
}
PERT represents a PERT distribution, which is a four parameter Beta distribution described by the parameters min, max, and mode, as well as the requirement that the mean = (max + 4 * mod + min) / 6. (https://en.wikipedia.org/wiki/PERT_distribution)
func NewPERT ¶
NewPERT constructs a new PERT distribution using the given min, max, and mode. Constraints are min < max and min ≤ mode ≤ max.
func (PERT) NumParameters ¶
NumParameters returns the number of parameters in the PERT distribution.