Skip to content

Commit

Permalink
last batch of corrections before 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PragTob committed Jul 5, 2019
1 parent 0f2deaf commit 0e61465
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 1.0 yyyy-mm-dd
## 1.0 2019-07-05

Import of the initial functionality from [benchee](github.com/bencheeorg/benchee).

Expand Down
9 changes: 5 additions & 4 deletions lib/statistex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ defmodule Statistex do
A measurement how much samples vary (the higher the more the samples vary). This is the variance of a sample and is hence in its calculation divided by sample_size - 1 (Bessel's correction).
`Argumenterror` is raised if the given list is empty.
## Options
If already calculated, the `:average` and `:sample_size` options can be provided to avoid recalulating those values.
`Argumenterror` is raised if the given list is empty.
## Examples
iex> Statistex.variance([4, 9, 11, 12, 17, 5, 8, 12, 12])
Expand Down Expand Up @@ -454,6 +454,8 @@ defmodule Statistex do
Goes from a concrete occurence of the sample to the number of times it was observed in the samples.
`Argumenterror` is raised if the given list is empty.
## Examples
iex> Statistex.frequency_distribution([1, 2, 4.23, 7, 2, 99])
Expand Down Expand Up @@ -504,8 +506,7 @@ defmodule Statistex do
[1, 3, 5]
"""
@spec mode(samples, keyword) :: mode
defdelegate mode(samples), to: Mode
defdelegate mode(samples, opts), to: Mode
def mode(samples, opts \\ []), do: Mode.mode(samples, opts)

@doc """
Calculates the median of the given samples.
Expand Down

0 comments on commit 0e61465

Please sign in to comment.