Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Sep 4, 2024
1 parent b8c3395 commit 45c7741
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 33 deletions.
14 changes: 8 additions & 6 deletions doc/distributions/fisher.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
typedef RealType value_type;

// Construct:
fisher_f_distribution(const RealType& i, const RealType& j);
BOOST_MATH_GPU_ENABLED fisher_f_distribution(const RealType& i, const RealType& j);

// Accessors:
RealType degrees_of_freedom1()const;
RealType degrees_of_freedom2()const;
BOOST_MATH_GPU_ENABLED RealType degrees_of_freedom1()const;
BOOST_MATH_GPU_ENABLED RealType degrees_of_freedom2()const;
};

}} //namespaces
Expand All @@ -46,26 +46,28 @@ two degrees of freedom parameters.

[h4 Member Functions]

fisher_f_distribution(const RealType& df1, const RealType& df2);
BOOST_MATH_GPU_ENABLED fisher_f_distribution(const RealType& df1, const RealType& df2);

Constructs an F-distribution with numerator degrees of freedom /df1/
and denominator degrees of freedom /df2/.

Requires that /df1/ and /df2/ are both greater than zero, otherwise __domain_error
is called.

RealType degrees_of_freedom1()const;
BOOST_MATH_GPU_ENABLED RealType degrees_of_freedom1()const;

Returns the numerator degrees of freedom parameter of the distribution.

RealType degrees_of_freedom2()const;
BOOST_MATH_GPU_ENABLED RealType degrees_of_freedom2()const;

Returns the denominator degrees of freedom parameter of the distribution.

[h4 Non-member Accessors]

All the [link math_toolkit.dist_ref.nmp usual non-member accessor functions]
that are generic to all distributions are supported: __usual_accessors.
For this distribution all non-member accessor functions are marked with `BOOST_MATH_GPU_ENABLED` and can
be run on both host and device.

The domain of the random variable is \[0, +[infin]\].

Expand Down
14 changes: 8 additions & 6 deletions doc/distributions/gamma.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
typedef RealType value_type;
typedef Policy policy_type;

gamma_distribution(RealType shape, RealType scale = 1)
BOOST_MATH_GPU_ENABLED gamma_distribution(RealType shape, RealType scale = 1)

RealType shape()const;
RealType scale()const;
BOOST_MATH_GPU_ENABLED RealType shape()const;
BOOST_MATH_GPU_ENABLED RealType scale()const;
};

}} // namespaces
Expand Down Expand Up @@ -76,26 +76,28 @@ a dedicated Erlang Distribution.

[h4 Member Functions]

gamma_distribution(RealType shape, RealType scale = 1);
BOOST_MATH_GPU_ENABLED gamma_distribution(RealType shape, RealType scale = 1);

Constructs a gamma distribution with shape /shape/ and
scale /scale/.

Requires that the shape and scale parameters are greater than zero, otherwise calls
__domain_error.

RealType shape()const;
BOOST_MATH_GPU_ENABLED RealType shape()const;

Returns the /shape/ parameter of this distribution.

RealType scale()const;
BOOST_MATH_GPU_ENABLED RealType scale()const;

Returns the /scale/ parameter of this distribution.

[h4 Non-member Accessors]

All the [link math_toolkit.dist_ref.nmp usual non-member accessor functions] that are generic to all
distributions are supported: __usual_accessors.
For this distribution all non-member accessor functions are marked with `BOOST_MATH_GPU_ENABLED` and can
be run on both host and device.

The domain of the random variable is \[0,+[infin]\].

Expand Down
16 changes: 9 additions & 7 deletions doc/distributions/geometric.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@
typedef RealType value_type;
typedef Policy policy_type;
// Constructor from success_fraction:
geometric_distribution(RealType p);
BOOST_MATH_GPU_ENABLED geometric_distribution(RealType p);

// Parameter accessors:
RealType success_fraction() const;
RealType successes() const;
BOOST_MATH_GPU_ENABLED RealType success_fraction() const;
BOOST_MATH_GPU_ENABLED RealType successes() const;

// Bounds on success fraction:
static RealType find_lower_bound_on_p(
BOOST_MATH_GPU_ENABLED static RealType find_lower_bound_on_p(
RealType trials,
RealType successes,
RealType probability); // alpha
static RealType find_upper_bound_on_p(
BOOST_MATH_GPU_ENABLED static RealType find_upper_bound_on_p(
RealType trials,
RealType successes,
RealType probability); // alpha

// Estimate min/max number of trials:
static RealType find_minimum_number_of_trials(
BOOST_MATH_GPU_ENABLED static RealType find_minimum_number_of_trials(
RealType k, // Number of failures.
RealType p, // Success fraction.
RealType probability); // Probability threshold alpha.
static RealType find_maximum_number_of_trials(
BOOST_MATH_GPU_ENABLED static RealType find_maximum_number_of_trials(
RealType k, // Number of failures.
RealType p, // Success fraction.
RealType probability); // Probability threshold alpha.
Expand Down Expand Up @@ -268,6 +268,8 @@ of observing more than k failures.

All the [link math_toolkit.dist_ref.nmp usual non-member accessor functions]
that are generic to all distributions are supported: __usual_accessors.
For this distribution all non-member accessor functions are marked with `BOOST_MATH_GPU_ENABLED` and can
be run on both host and device.

However it's worth taking a moment to define what these actually mean in
the context of this distribution:
Expand Down
18 changes: 10 additions & 8 deletions doc/distributions/inverse_chi_squared.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
typedef RealType value_type;
typedef Policy policy_type;

inverse_chi_squared_distribution(RealType df = 1); // Not explicitly scaled, default 1/df.
inverse_chi_squared_distribution(RealType df, RealType scale = 1/df); // Scaled.
BOOST_MATH_GPU_ENABLED inverse_chi_squared_distribution(RealType df = 1); // Not explicitly scaled, default 1/df.
BOOST_MATH_GPU_ENABLED inverse_chi_squared_distribution(RealType df, RealType scale = 1/df); // Scaled.

RealType degrees_of_freedom()const; // Default 1.
RealType scale()const; // Optional scale [xi] (variance), default 1/degrees_of_freedom.
BOOST_MATH_GPU_ENABLED RealType degrees_of_freedom()const; // Default 1.
BOOST_MATH_GPU_ENABLED RealType scale()const; // Optional scale [xi] (variance), default 1/degrees_of_freedom.
};

}} // namespace boost // namespace math
Expand Down Expand Up @@ -99,27 +99,29 @@ varies for a few values of parameters [nu] and [xi]:

[h4 Member Functions]

inverse_chi_squared_distribution(RealType df = 1); // Implicitly scaled 1/df.
inverse_chi_squared_distribution(RealType df = 1, RealType scale); // Explicitly scaled.
BOOST_MATH_GPU_ENABLED inverse_chi_squared_distribution(RealType df = 1); // Implicitly scaled 1/df.
BOOST_MATH_GPU_ENABLED inverse_chi_squared_distribution(RealType df = 1, RealType scale); // Explicitly scaled.

Constructs an inverse chi_squared distribution with [nu] degrees of freedom ['df],
and scale ['scale] with default value 1\/df.

Requires that the degrees of freedom [nu] parameter is greater than zero, otherwise calls
__domain_error.

RealType degrees_of_freedom()const;
BOOST_MATH_GPU_ENABLED RealType degrees_of_freedom()const;

Returns the degrees_of_freedom [nu] parameter of this distribution.

RealType scale()const;
BOOST_MATH_GPU_ENABLED RealType scale()const;

Returns the scale [xi] parameter of this distribution.

[h4 Non-member Accessors]

All the [link math_toolkit.dist_ref.nmp usual non-member accessor functions] that are generic to all
distributions are supported: __usual_accessors.
For this distribution all non-member accessor functions are marked with `BOOST_MATH_GPU_ENABLED` and can
be run on both host and device.

The domain of the random variate is \[0,+[infin]\].
[note Unlike some definitions, this implementation supports a random variate
Expand Down
14 changes: 8 additions & 6 deletions doc/distributions/inverse_gamma.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
typedef RealType value_type;
typedef Policy policy_type;

inverse_gamma_distribution(RealType shape, RealType scale = 1)
BOOST_MATH_GPU_ENABLED inverse_gamma_distribution(RealType shape, RealType scale = 1)

RealType shape()const;
RealType scale()const;
BOOST_MATH_GPU_ENABLED RealType shape()const;
BOOST_MATH_GPU_ENABLED RealType scale()const;
};

}} // namespaces
Expand Down Expand Up @@ -63,25 +63,27 @@ varies as the parameters vary:

[h4 Member Functions]

inverse_gamma_distribution(RealType shape = 1, RealType scale = 1);
BOOST_MATH_GPU_ENABLED inverse_gamma_distribution(RealType shape = 1, RealType scale = 1);

Constructs an inverse gamma distribution with shape [alpha] and scale [beta].

Requires that the shape and scale parameters are greater than zero, otherwise calls
__domain_error.

RealType shape()const;
BOOST_MATH_GPU_ENABLED RealType shape()const;

Returns the [alpha] shape parameter of this inverse gamma distribution.

RealType scale()const;
BOOST_MATH_GPU_ENABLED RealType scale()const;

Returns the [beta] scale parameter of this inverse gamma distribution.

[h4 Non-member Accessors]

All the [link math_toolkit.dist_ref.nmp usual non-member accessor functions] that are generic to all
distributions are supported: __usual_accessors.
For this distribution all non-member accessor functions are marked with `BOOST_MATH_GPU_ENABLED` and can
be run on both host and device.

The domain of the random variate is \[0,+[infin]\].
[note Unlike some definitions, this implementation supports a random variate
Expand Down

0 comments on commit 45c7741

Please sign in to comment.