Documentation ¶
Index ¶
- Constants
- func CheckValueRange(t *testing.T, valueRange ValueRange, expMin, expMax float64)
- func ContainsAll(slice *[]Identifiable, values *[]string) bool
- func ContainsByIdentity(slice *[]Identifiable, value *string) bool
- func ContainsInts(slice *[]int, value *int) bool
- func ContainsString(slice *[]string, value *string) bool
- func DecodeToStruct(src, target interface{})
- func Differs(a, b interface{}) bool
- func ErrorDiffers(err interface{}, message string) bool
- func ExpectError(t *testing.T, expectedMessage string) func()
- func FloatsAreEqual(expected float64, actual float64, epsilon float64) bool
- func IsInBounds(value float64, lower float64, upper float64) bool
- func IsPositive(value float64) bool
- func IsProbability(value float64) bool
- func RandomGenerator(seed int64) *rand.Rand
- func RemoveSingleStringOccurrence(s []string, r string) []string
- func ToIdentifiable(objects IdentifiableIterable) *[]Identifiable
- type Array
- type ExpFromZeroFunction
- type Identifiable
- type IdentifiableIterable
- type IdentityMap
- type LinearFunctionParameters
- type Map
- type SeededValueGenerator
- type ToIdentityConverter
- type ValueGenerator
- type ValueRange
Constants ¶
View Source
const ExpFromZeroFunctionName = "expFromZero"
View Source
const LinearFunctionName = "linear"
Variables ¶
This section is empty.
Functions ¶
func CheckValueRange ¶
func CheckValueRange(t *testing.T, valueRange ValueRange, expMin, expMax float64)
func ContainsAll ¶
func ContainsAll(slice *[]Identifiable, values *[]string) bool
func ContainsByIdentity ¶
func ContainsByIdentity(slice *[]Identifiable, value *string) bool
func ContainsInts ¶
func ContainsString ¶
func DecodeToStruct ¶
func DecodeToStruct(src, target interface{})
func ErrorDiffers ¶
func ExpectError ¶
func IsPositive ¶
func IsProbability ¶
func RandomGenerator ¶
func ToIdentifiable ¶
func ToIdentifiable(objects IdentifiableIterable) *[]Identifiable
Types ¶
type ExpFromZeroFunction ¶
type ExpFromZeroFunction struct { Alpha float64 `json:"alpha"` Multiplier float64 `json:"multiplier"` }
func (*ExpFromZeroFunction) Evaluate ¶
func (e *ExpFromZeroFunction) Evaluate(value float64) float64
func (*ExpFromZeroFunction) String ¶
func (e *ExpFromZeroFunction) String() string
type Identifiable ¶
type Identifiable interface {
Identifier() string
}
type IdentifiableIterable ¶
type IdentifiableIterable interface { Get(index int) Identifiable Len() int }
type IdentityMap ¶
type IdentityMap = map[string]Identifiable
func AsMap ¶
func AsMap(objects IdentifiableIterable) *IdentityMap
type LinearFunctionParameters ¶
func (*LinearFunctionParameters) Evaluate ¶
func (f *LinearFunctionParameters) Evaluate(value float64) (result float64, ok bool)
func (*LinearFunctionParameters) String ¶
func (f *LinearFunctionParameters) String() string
type SeededValueGenerator ¶
type SeededValueGenerator = func(seed int64) ValueGenerator
type ToIdentityConverter ¶
type ToIdentityConverter func(interface{}) Identifiable
type ValueGenerator ¶
type ValueGenerator = func() float64
func NewValueInRangeGenerator ¶
func NewValueInRangeGenerator(generator ValueGenerator, valueRange *ValueRange) ValueGenerator
func RandomBasedSeedValueGenerator ¶
func RandomBasedSeedValueGenerator(seed int64) ValueGenerator
type ValueRange ¶
func NewValueRange ¶
func NewValueRange() *ValueRange
func (*ValueRange) Diff ¶
func (r *ValueRange) Diff() float64
func (*ValueRange) ScaleEqually ¶
func (r *ValueRange) ScaleEqually(scale float64) *ValueRange
func (*ValueRange) String ¶
func (r *ValueRange) String() string
Click to show internal directories.
Click to hide internal directories.