Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit 341273e

Browse files
committed
Update docstring of RandomThinning
1 parent 86c0bf4 commit 341273e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/thinning/random.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@
55
"""
66
RandomThinning(p)
77
8-
Random thining with retention probability `p`.
8+
Random thining with retention probability `p`, which can
9+
be a constant probability value in `[0,1]` or a function
10+
mapping a point to a probability.
11+
12+
## Examples
13+
14+
```julia
15+
RandomThinning(0.5)
16+
RandomThinning(p -> sum(coordinates(p)))
17+
```
918
"""
1019
struct RandomThinning{P<:Union{Real,Function}} <: ThinningMethod
1120
p::P

0 commit comments

Comments
 (0)