From 7ec92c7916046345eb267889db7a52405372897f Mon Sep 17 00:00:00 2001 From: jmacd Date: Fri, 8 Nov 2019 13:35:18 -0800 Subject: [PATCH] Add simple/doc.go --- README.md | 6 +++--- doc.go | 2 +- simple/doc.go | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 simple/doc.go diff --git a/README.md b/README.md index ba73609..a949cc0 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ Thorup. VarOpt is a reservoir-type sampler that maintains a fixed-size sample and provides a mechanism for merging unequal-weight samples. -This package also includes a simple reservoir sampling algorithm, -often useful in conjunction with weighed reservoir sampling, using -Algorithm R from [Random sampling with a +This repository also includes a simple reservoir sampling algorithm, +often useful in conjunction with weighed reservoir sampling, that +implements Algorithm R from [Random sampling with a reservoir](https://en.wikipedia.org/wiki/Reservoir_sampling#Algorithm_R) (1985) by Jeffrey Vitter. diff --git a/doc.go b/doc.go index deb2de9..fe0e2e6 100644 --- a/doc.go +++ b/doc.go @@ -1,7 +1,7 @@ // Copyright 2019, LightStep Inc. /* -Package varopt is an implementation of VarOpt, an unbiased weighted +Package varopt contains an implementation of VarOpt, an unbiased weighted sampling algorithm described in the paper "Stream sampling for variance-optimal estimation of subset sums" https://arxiv.org/pdf/0803.0473.pdf (2008), by Edith Cohen, Nick diff --git a/simple/doc.go b/simple/doc.go new file mode 100644 index 0000000..0d79ebe --- /dev/null +++ b/simple/doc.go @@ -0,0 +1,4 @@ +// Copyright 2019, LightStep Inc. + +/* Package simple implements an unweighted reservoir sampling algorithm. */ +package simple