Skip to content

Commit

Permalink
package-info.java additions
Browse files Browse the repository at this point in the history
  • Loading branch information
gstamatelat committed Jul 3, 2018
1 parent 931d622 commit 7b2f7c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/gr/james/sampling/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
* The top level interfaces are {@link gr.james.sampling.RandomSampling} and
* {@link gr.james.sampling.WeightedRandomSampling}, which represent unweighted and weighted random sampling algorithms
* respectively. The {@code WeightedRandomSampling} interface extends {@code RandomSampling} and, thus, weighted
* algorithms can be used in place as unweighted, usually with a performance penalty.
* algorithms can be used in-place as unweighted, usually with a performance penalty due to the extra weight-related
* overhead.
* <h3>Properties</h3>
* <h4>Complexity</h4>
* A fundamental principle of reservoir based sampling algorithms is that the memory complexity is linear in respect to
* the reservoir size. Furthermore, the sampling process is performed using a single pass of the stream. The amount of
* RNG invocations vary among the different implementations.
* the reservoir size {@code O(k)}. Furthermore, the sampling process is performed using a single pass of the stream.
* The amount of RNG invocations vary among the different implementations.
* <h4>Precision</h4>
* Many implementations have an accumulating state which causes the precision of the algorithms to degrade as the stream
* becomes bigger. An example might be a variable state which strictly increases or decreases as elements are read from
Expand Down

0 comments on commit 7b2f7c7

Please sign in to comment.