Skip to content

Commit 9ee76b5

Browse files
committed
doc: add doc for stirlings2
1 parent 0280cc5 commit 9ee76b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/numbers.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ function stirlings1(n::Int, k::Int, signed::Bool=false)
151151
return (n - 1) * stirlings1(n - 1, k) + stirlings1(n - 1, k - 1)
152152
end
153153

154+
"""
155+
stirlings2(n::Int, k::Int)
156+
157+
Compute the Stirling number of the second kind, `S(n,k)`.
158+
"""
154159
function stirlings2(n::Int, k::Int)
155160
if n < 0
156161
throw(DomainError(n, "n must be nonnegative"))

0 commit comments

Comments
 (0)