Indicado.SR.eval

You're seeing just the function eval, go back to Indicado.SR module for more information.

Specs

eval([list(), ...], pos_integer()) :: {:ok, [float(), ...]} | {:error, atom()}

Calculates SR for the list.

Returns {:ok, rs_list} or {:error, reason}

Examples

iex> Indicado.SR.eval([1, 3, 4, 3, 1, 5], 4)
{:ok, [66.66666666666666, 0.0, 100.0]}

iex> Indicado.SR.eval([1, 10, 5, 3, 9, 12, 6, 3, 4], 5)
{:ok, [88.88888888888889, 100.0, 33.33333333333333, 0.0, 11.11111111111111]}

iex> Indicado.SR.eval([1, 3], 3)
{:error, :not_enough_data}

iex> Indicado.SR.eval([1, 3, 4], 0)
{:error, :bad_period}