# context_math.pl -- Math operations for array manipulations

such as dot product, convolution and functional mapping

**separate**`(+L, -X)`- Separate off functor, removes a lead functor, not needed?
**ones**`(+Scalar, List)`- Generate a ones list
**constants**`(+Length, +Scalar, -List)`- Generate a list of constants
**uniform**`(+Length, -Final)`- Generate a list of normalized uniform constants such that total is unity
**linear_range**`(+Start, +End, -Range)`- Generate an integer numbered list.
This is the same as built-in =>
`numlist(Start, End, List)`

**linear_fractional_range**`(+Start, +End, +Fraction, -Range)`- Generate a fractional linear range
**log_range**`(+Start, +End, +Frac, -Range)`- Generate a logarithmic range
`+From`**range**`+To`- Range of numbers into a list
`+X`**dot**`+Y`- Dot product of two arrays or lists of the same length
`+X`**mapdot**`+Y`- Map Dot is a dot product of individual elements, retaining the list structure.
`+X`**convolve**`+Y`- Convolve (convulution operator) list with another list.
`+X`**correlate**`+Y`- Pair correlate one list with another list.
`+X`**derivative**`+Y`- Take the derivative of one list with respect to another list.
`+X`**integrate**`+Y`- Take the integral of one list with respect to another delta list.
**cumulative_histogram**`(+List, -Variates, -Probs)`- Cumulative histogram of list generating
`Variates`and`Probs` `+X`**difference**`+Y`- Take the difference of one list with respect to another list.
`+X`**tuple**`+Y`- Create a tuple list from two lists.
`+X`**group**`+Y`- Create a tuple list from two lists.
**histogram**`(+List, -Variates, -Probs)`- Histogram into variates and probability creating cumulative histogram array, has problems with duplicates
`+X`**unbias**`-Y`- Remove the mean from a list of values, so the sum is zero.
`+X`**normalize**`-Y`- Normalize a list of values, so the sum is unity.
`+X`**pdf**`-Y`- Create a PDF from a list of values.
`+X`**zshift**`-Y`- Do a DSP z-shift from a list.
`+X`**window**`-Y`- Do a lag-window or centered window on a list.
`+X`**shrink**`-Y`- Shrink a list to match the second.
`+X`**expand**`-Y`- Expand a list to match the second.
`+X`**cat**`-Y`- Flatten a list.
`+X`**offset**`+Y`- Offset a list by N elements.
`+X`**ordinal**`+Y`- Create an ordinal (counting) list from a list.
`+X`**split**`+Y`- Split pairs of values into two sequential lists.
**index**`(+List, +Pos, -Index)``Index`a list like an array, only on flat uniformly-space lists**spatial**`(+List, +Pos, -Value)`- Index a list like an array
`+X`**deplete**`-Y`- deplete a list according to a rate.
**interpolate**`(+Line, +Table, -Result)`- interpolate along a number line according to a sparse table.
`+X`**invert**`+Y`- Invert sign of all list.
`+X`**reciprocal**`+Y`- Reciprocal of all list.
**extract**`(+X, +From, +To, -Y)`- Extract a section from a list.
**exclude**`(+X, +From, +To, -Y)`- Exclude a section from a list.

## Undocumented predicates

The following predicates are exported, but not or incorrectly documented.