Skip to content

Commit 067c6e7

Browse files
committed
Add documentation
1 parent d87ce89 commit 067c6e7

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

doc/math.qbk

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ and use the function's name as the link text.]
339339
[def __hermite [link math_toolkit.sf_poly.hermite hermite]]
340340
[def __cardinal_b_splines [link math_toolkit.sf_poly.cardinal_b_splines cardinal_b_splines]]
341341

342+
[/logistic functions]
343+
[def __logit [link math_toolkit.logistic.logit logit]]
344+
[def __logistic_sigmoid [link math_toolkit.logistic.logistic_sigmoid logistic_sigmoid]]
345+
342346
[/Misc]
343347
[def __expint [link math_toolkit.expint.expint_i expint]]
344348
[def __spherical_harmonic [link math_toolkit.sf_poly.sph_harm spherical_harmonic]]
@@ -666,6 +670,11 @@ and as a CD ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22.
666670
[include sf/jacobi.qbk]
667671
[endsect] [/section:sf_poly Polynomials]
668672

673+
[section:logistic Logistic Functions]
674+
[include sf/logit.qbk]
675+
[include sf/logistic_sigmoid.qbk]
676+
[endsect] [/section:logistic Logistic Functions]
677+
669678
[section:bessel Bessel Functions]
670679
[include sf/bessel_introduction.qbk]
671680
[include sf/bessel_jy.qbk]

doc/sf/logistic_sigmoid.qbk

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[/
2+
Copyright Matt Borland 2025
3+
Distributed under the Boost Software License, Version 1.0.
4+
(See accompanying file LICENSE_1_0.txt or copy at
5+
http://www.boost.org/LICENSE_1_0.txt).
6+
]
7+
8+
[section:logistic_sigmoid logistic_sigmoid]
9+
10+
[h4 Synopsis]
11+
12+
#include <boost/math/special_functions/logistic_sigmoid.hpp>
13+
14+
namespace boost { namespace math {
15+
16+
template <typename RealType, typename Policy>
17+
RealType logistic_sigmoid(RealType x, const Policy&);
18+
19+
template <typename RealType>
20+
RealType logistic_sigmoid(RealType x)
21+
22+
}} // namespaces
23+
24+
[h4 Description]
25+
26+
Returns the [@https://en.wikipedia.org/wiki/Logistic_function logistic sigmoid function]
27+
This function is broadly useful, and is used to compute the CDF of the logistic distribution.
28+
It is also sometimes referred to as expit as it is the inverse of the logit function.
29+
30+
[endsect]

doc/sf/logit.qbk

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[/
2+
Copyright Matt Borland 2025
3+
Distributed under the Boost Software License, Version 1.0.
4+
(See accompanying file LICENSE_1_0.txt or copy at
5+
http://www.boost.org/LICENSE_1_0.txt).
6+
]
7+
8+
[section:logit logit]
9+
10+
[h4 Synopsis]
11+
12+
#include <boost/math/special_functions/logit.hpp>
13+
14+
namespace boost { namespace math {
15+
16+
template <typename RealType, typename Policy>
17+
RealType logit(RealType x, const Policy&);
18+
19+
template <typename RealType>
20+
RealType logit(RealType x)
21+
22+
}} // namespaces
23+
24+
[h4 Description]
25+
26+
Returns the [@https://en.wikipedia.org/wiki/Logit logit function]
27+
This function is broadly useful, and is used to compute the Quantile of the logistic distribution.
28+
The inverse of this function is the logistic_sigmoid.
29+
30+
[endsect]

0 commit comments

Comments
 (0)