Logo GenPRES

Limit Module

Creates, compares and formats an inclusive or exclusive limit of a range, and moves a limit to a multiple of an increment.

Functions and values

Function or value Description

apply fIncl fExcl

Full Usage: apply fIncl fExcl

Parameters:
Returns: Limit -> Limit
Modifiers: inline
fIncl : ValueUnit -> ValueUnit
fExcl : ValueUnit -> ValueUnit
Returns: Limit -> Limit

calcLimitIncr arg1

Full Usage: calcLimitIncr arg1

Parameters:
Returns: LimitIncr
arg0 : LimitIncr
Returns: LimitIncr

cmpToStr cp

Full Usage: cmpToStr cp

Parameters:
Returns: string
cp : Limit -> Limit -> bool
Returns: string

compOpt comp nn sn ns v1 v2

Full Usage: compOpt comp nn sn ns v1 v2

Parameters:
    comp : 'a -> 'b -> 'c
    nn : 'c
    sn : 'c
    ns : 'c
    v1 : 'a option
    v2 : 'b option

Returns: 'c
Type parameters: 'a, 'b, 'c

Compares two optional values with comp. Returns nn when both are None, sn when only v1 is given and ns when only v2 is given.

comp : 'a -> 'b -> 'c
nn : 'c
sn : 'c
ns : 'c
v1 : 'a option
v2 : 'b option
Returns: 'c

eq

Full Usage: eq

Returns: Limit -> Limit -> bool
Returns: Limit -> Limit -> bool

exclusive v

Full Usage: exclusive v

Parameters:
Returns: Limit
v : ValueUnit
Returns: Limit

getIncr arg1

Full Usage: getIncr arg1

Parameters:
Returns: ValueUnit
arg0 : LimitIncr
Returns: ValueUnit

getValue

Full Usage: getValue

Returns: Limit -> BigRational option
Returns: Limit -> BigRational option

getValueUnit

Full Usage: getValueUnit

Returns: Limit -> ValueUnit
Returns: Limit -> ValueUnit

gt isMin1 isMin2

Full Usage: gt isMin1 isMin2

Parameters:
    isMin1 : bool
    isMin2 : bool

Returns: Limit -> Limit -> bool

Returns a check whether the first limit is greater than the second limit. isMin1 and isMin2 tell whether each limit is a minimum or a maximum; for equal values, inclusive or exclusive decides the result.

isMin1 : bool
isMin2 : bool
Returns: Limit -> Limit -> bool

gte isMin1 isMin2

Full Usage: gte isMin1 isMin2

Parameters:
    isMin1 : bool
    isMin2 : bool

Returns: Limit -> Limit -> bool

Returns a check whether the first limit is greater than or equal to the second limit. isMin1 and isMin2 tell whether each limit is a minimum or a maximum.

isMin1 : bool
isMin2 : bool
Returns: Limit -> Limit -> bool
Example

 let gteMin = Limit.gte true true
 let oneIncl = Units.Count.times |> ValueUnit.singleWithValue 1N |> Inclusive
 let twoIncl = Units.Count.times |> ValueUnit.singleWithValue 2N |> Inclusive
 gteMin oneIncl twoIncl // false
 gteMin twoIncl oneIncl // true
val gteMin: (obj -> obj -> obj)
val oneIncl: obj
val twoIncl: obj

inclusive v

Full Usage: inclusive v

Parameters:
Returns: Limit
v : ValueUnit
Returns: Limit

isInclusive _arg1

Full Usage: isInclusive _arg1

Parameters:
Returns: bool
_arg1 : Limit
Returns: bool

map fIncl fExcl lim

Full Usage: map fIncl fExcl lim

Parameters:
Returns: 'a
Modifiers: inline
Type parameters: 'a
fIncl : ValueUnit -> 'a
fExcl : ValueUnit -> 'a
lim : Limit
Returns: 'a

map2 fInclIncl fInclExcl fExclIncl fExclExcl lim1 lim2

Full Usage: map2 fInclIncl fInclExcl fExclIncl fExclExcl lim1 lim2

Parameters:
Returns: 'a
Modifiers: inline
Type parameters: 'a
fInclIncl : ValueUnit -> ValueUnit -> 'a
fInclExcl : ValueUnit -> ValueUnit -> 'a
fExclIncl : ValueUnit -> ValueUnit -> 'a
fExclExcl : ValueUnit -> ValueUnit -> 'a
lim1 : Limit
lim2 : Limit
Returns: 'a

maxToMultipleOf

Full Usage: maxToMultipleOf

Returns: LimitIncr -> Limit -> Limit
Returns: LimitIncr -> Limit -> Limit

minGTmax max min

Full Usage: minGTmax max min

Parameters:
Returns: bool

Whether the minimum min lies above the maximum max, so no value fits between the two. A minimum equal to the maximum lies above it when one of the two limits is exclusive.

max : Limit
min : Limit
Returns: bool

minToMultipleOf

Full Usage: minToMultipleOf

Returns: LimitIncr -> Limit -> Limit
Returns: LimitIncr -> Limit -> Limit

one

Full Usage: one

Returns: Limit
Returns: Limit

optLT isMin1 isMin2

Full Usage: optLT isMin1 isMin2

Parameters:
    isMin1 : bool
    isMin2 : bool

Returns: Limit option -> Limit option -> bool
isMin1 : bool
isMin2 : bool
Returns: Limit option -> Limit option -> bool

optLTE isMin1 isMin2

Full Usage: optLTE isMin1 isMin2

Parameters:
    isMin1 : bool
    isMin2 : bool

Returns: Limit option -> Limit option -> bool
isMin1 : bool
isMin2 : bool
Returns: Limit option -> Limit option -> bool

optST isMin1 isMin2

Full Usage: optST isMin1 isMin2

Parameters:
    isMin1 : bool
    isMin2 : bool

Returns: Limit option -> Limit option -> bool
isMin1 : bool
isMin2 : bool
Returns: Limit option -> Limit option -> bool

optSTE isMin1 isMin2

Full Usage: optSTE isMin1 isMin2

Parameters:
    isMin1 : bool
    isMin2 : bool

Returns: Limit option -> Limit option -> bool
isMin1 : bool
isMin2 : bool
Returns: Limit option -> Limit option -> bool

st isMin1 isMin2

Full Usage: st isMin1 isMin2

Parameters:
    isMin1 : bool
    isMin2 : bool

Returns: Limit -> Limit -> bool

Returns a check whether the first limit is smaller than the second limit. isMin1 and isMin2 tell whether each limit is a minimum or a maximum; for equal values, inclusive or exclusive decides the result.

isMin1 : bool
isMin2 : bool
Returns: Limit -> Limit -> bool

ste isMin1 isMin2

Full Usage: ste isMin1 isMin2

Parameters:
    isMin1 : bool
    isMin2 : bool

Returns: Limit -> Limit -> bool

Returns a check whether the first limit is smaller than or equal to the second limit. isMin1 and isMin2 tell whether each limit is a minimum or a maximum; for equal values, inclusive or exclusive decides the result.

isMin1 : bool
isMin2 : bool
Returns: Limit -> Limit -> bool

toMultipleOf inclMultOf exclMultOf arg3 min

Full Usage: toMultipleOf inclMultOf exclMultOf arg3 min

Parameters:
Returns: Limit
inclMultOf : Set<BigRational> -> BigRational -> RationalX
exclMultOf : Set<BigRational> -> BigRational -> RationalX
arg2 : LimitIncr
min : Limit
Returns: Limit

toString isMin lim

Full Usage: toString isMin lim

Parameters:
    isMin : bool
    lim : Limit

Returns: string
isMin : bool
lim : Limit
Returns: string

toToken _arg1

Full Usage: toToken _arg1

Parameters:
Returns: string
_arg1 : Limit
Returns: string

validate arg1

Full Usage: validate arg1

Parameters:
Returns: Result<LimitIncr, Msg<'a, LimitIncr>>
Type parameters: 'a
arg0 : LimitIncr
Returns: Result<LimitIncr, Msg<'a, LimitIncr>>

zero

Full Usage: zero

Returns: Limit
Returns: Limit

Type something to start searching.