Class BetaDistribution
Wrapper for beta distribution which is not part of the stl random module.

Defined in <seqan/random.h>
Signature class BetaDistribution<TRealType>;

Template Parameters

TRealType A floating-point type. Aliased as member type result_type. By default, this is double.

Member Function Overview

Interface Function Overview

Detailed Description

This distribution produces random numbers that are distributed according to the beta distribution.

Member Functions Detail

explicit BetaDistribution(a, b) explicit BetaDistribution(param)

Constructor for the beta distribution.

Parameters

a Tha alpha value of the beta distribution. Defaults to 2.0.
b Tha beta value of the beta distribution. Defaults to 2.0.
param Tha param type of the beta distribution.

Data Races

Thread safety unknown!

Interface Functions Detail

TRealType alpha();

Returns the alpha parameter associated with the beta distribution.

Returns

TRealType Returns the alpha parameter.

Data Races

Thread safety unknown!

TRealType beta();

Returns the beta parameter associated with the beta distribution.

Returns

TRealType Returns the beta parameter.

Data Races

Thread safety unknown!

TRealType max();

Maximum value.

Returns

TRealType Returns the least upper bound of the range of values potentially returned by member operator().

Data Races

Thread safety unknown!

TRealType min();

Minimum value.

Returns

TRealType Returns the greatest lower bound of the range of values potentially returned by member operator(), which for BetaDistribution is always zero.

Data Races

Thread safety unknown!

TRealType operator(rng); TRealType operator(rng, param);

Generate random number.

Parameters

rng The random number generator engine.
param The parameter to used for the distribution.

Returns

TRealType The generated random number.

Data Races

Thread safety unknown!

stream operator<<(stream, beta);

Writes to output stream.

Parameters

stream The stream to write to.
beta An instance of the beta distribution.

Returns

stream The updated stream to write too.

Writes a textual representation of the distribution parameters and any other internal data kept by the object, in such a way that if this same text is inserted using operator>> into an object of the same type, the same sequence of random numbers would be generated by equivalent invocations of operator().

Data Races

Thread safety unknown!

See Also

stream operator>>(stream, beta);

Reads from input stream.

Parameters

stream The stream to read from.
beta An instance of the beta distribution to read from input.

Returns

stream The updated stream to write too.

Restores the distribution parameters and any other internal data into distr from the textual representation provided by is.

beta will generate the same sequence of random numbers as if equivalent invocations of operator() were performed on the object of the same type from which the provided text was obtained.

Data Races

Thread safety unknown!

See Also

TParamType param() const;

Returns the parameters of this distribution.

Returns

TParamType The parameter of this distribution. Of type typename BetaDistribution\<TRealType\>::param_type .

Data Races

Thread safety unknown!

See Also

void setParam(param);

Sets the given parameters to this distribution.

Parameters

param The parameters to be set to this distribution.

Data Races

Thread safety unknown!

See Also