cristian_bara / Moving3PairAverage / 0.2.0
README.md
Overview
This implementation is a simple moving average considering 3 pairs at a time.
Usage
Input
We will expect an Array of Numbers as input.
Parameter | Description |
---|---|
input | Array of Number |
Example:
input = [1,4,3,5,6,2,9];
Output
The output will show a simple moving average Array.
Parameter | Description |
---|---|
code | Number - the http code corresponding to the status of the function call |
message | String - the string explanation of the code number corresponding to the status of the function call |
averages | Array of Number - the array of averages. null values were added to the first and last position of the arrays in order to make plotting easy along side the input Array |
Example:
output = {
averages:[null,2.6666666666666665,4,4.666666666666667,4.333333333333333,5.666666666666667,null],
code:200,
message:"Success"
}
Examples
input = [1,4,3,5,6,2,9]
output = {
averages:[null,2.6666666666666665,4,4.666666666666667,4.333333333333333,5.666666666666667,null],
code:200,
message:"Success"
}
Contents