Padding Module

padds data points to the beginning, the end and on internal intervals of the data

Types and nested modules

Type/Module Description

Discrete

HelperFunctions

BorderPaddingMethod

padds data point at signals start and end

HugeGapPaddingMethod

padds data point in huge gaps (e.g. big ranges with no data)

InternalPaddingMethod

padds data point in small gaps (e.g. a missing data point or small ranges with no data)

Functions and values

Function or value Description

pad data minDistance maxDistance getDiff addToXValue borderpadding borderPaddingMethod internalPaddingMethod hugeGapPaddingMethod

Full Usage: pad data minDistance maxDistance getDiff addToXValue borderpadding borderPaddingMethod internalPaddingMethod hugeGapPaddingMethod

Parameters:
    data : ('a * float)[] -
    minDistance : float -
    maxDistance : float -
    getDiff : 'a -> 'a -> float - get the difference in x_Values as float representation (if 'a is float then (-))
    addToXValue : 'a -> float -> 'a - function that adds a float to the x_Value (if 'a is float then (+))
    borderpadding : int -
    borderPaddingMethod : BorderPaddingMethod -
    internalPaddingMethod : InternalPaddingMethod -
    hugeGapPaddingMethod : HugeGapPaddingMethod -

Returns: ('a * float)[]
Modifiers: inline
Type parameters: 'a

Adds additional data points to the beginning and end of data set (number: borderpadding; x_Value distance: minDistance; y_Value: random).
Between every pair of data point where the difference in x_Values is greater than minDistance, additional datapoints are generated as defined in internalPaddingMethod.
If huge data chunks are missing (missing gap < maxDistance), data points are added as defined in hugeGapPaddingMethod.

default: internalPaddingMethod=LinearInterpolation; hugeGapPaddingMethod=Random (like in border cases)

data : ('a * float)[]

minDistance : float

maxDistance : float

getDiff : 'a -> 'a -> float

get the difference in x_Values as float representation (if 'a is float then (-))

addToXValue : 'a -> float -> 'a

function that adds a float to the x_Value (if 'a is float then (+))

borderpadding : int

borderPaddingMethod : BorderPaddingMethod

internalPaddingMethod : InternalPaddingMethod

hugeGapPaddingMethod : HugeGapPaddingMethod

Returns: ('a * float)[]

Example

padSignalEnd x

Full Usage: padSignalEnd x

Parameters:
    x : 'a

Returns: 'b
x : 'a
Returns: 'b

padSignalStart x

Full Usage: padSignalStart x

Parameters:
    x : 'a

Returns: 'b
x : 'a
Returns: 'b

padSignalStartAndEnd x

Full Usage: padSignalStartAndEnd x

Parameters:
    x : 'a

Returns: 'b
x : 'a
Returns: 'b

padSparseSignal x

Full Usage: padSparseSignal x

Parameters:
    x : 'a

Returns: 'b
x : 'a
Returns: 'b