emat/util/distributions.py
def triangle(
		lower_bound,
		upper_bound=None,
		*,
		rel_peak=None,
		peak=None,
		width=None,
):
	"""
	Generate a frozen scipy.stats.triang distribution.

	This function provides the same actual distribution as ``triang``,
	but offers multiple intuitive ways to identify the peak and upper bound of the
	distribution, while ``triang`` is less flexible and intuitive (it must be defined
	using arguments labeled as 'c', 'loc', and 'scale').

	Args:
		lower_bound (numeric):
			The lower bound of the distribution.
		upper_bound (numeric, optional):
			The upper bound of the distribution.  Can be inferred
			from `width` if not given.
		rel_peak (numeric, optional):
			The relative position of the peak of the triangle.  Must
			be in the range (0,1).  If neither `peak` nor `rel_peak`
			is given, a default value of 0.5 is used.
		peak (numeric, optional):
			The location of the peak of the triangle, given as a particular
			value, which must be between the lower and upper bounds inclusive.
		width (numeric, optional):
			The distance between the lower and upper bounds.
			Can be inferred from those values if not given.

	Returns:
		scipy.stats.rv_frozen
	"""
	lower_bound, upper_bound, rel_peak, peak, width = _peaked_distribution_args(
		lower_bound, upper_bound, rel_peak, peak, width
	)

	return triang(c=rel_peak, loc=lower_bound, scale=width)

	Generate a frozen scipy.stats.triang distribution.

	This function provides the same actual distribution as ``triang``,
	but offers multiple intuitive ways to identify the peak and upper bound of the
	distribution, while ``triang`` is less flexible and intuitive (it must be defined
	using arguments labeled as 'c', 'loc', and 'scale').

	Args:
		lower_bound (numeric):
			The lower bound of the distribution.
		upper_bound (numeric, optional):
			The upper bound of the distribution.  Can be inferred
			from `width` if not given.
		rel_peak (numeric, optional):
			The relative position of the peak of the triangle.  Must
			be in the range (0,1).  If neither `peak` nor `rel_peak`
			is given, a default value of 0.5 is used.
		peak (numeric, optional):
			The location of the peak of the triangle, given as a particular
			value, which must be between the lower and upper bounds inclusive.
		width (numeric, optional):
			The distance between the lower and upper bounds.
			Can be inferred from those values if not given.

	Returns:
		scipy.stats.rv_frozen
	
Generate a frozen scipy.stats.triang distribution.
Generate a frozen scipy . stats . triang distribution .
def triangle(
		lower_bound,
		upper_bound=None,
		*,
		rel_peak=None,
		peak=None,
		width=None,
):
	lower_bound, upper_bound, rel_peak, peak, width = _peaked_distribution_args(
		lower_bound, upper_bound, rel_peak, peak, width
	)
	return triang(c=rel_peak, loc=lower_bound, scale=width)
def triangle ( lower_bound , upper_bound = None , * , rel_peak = None , peak = None , width = None , ) : lower_bound , upper_bound , rel_peak , peak , width = _peaked_distribution_args ( lower_bound , upper_bound , rel_peak , peak , width ) return triang ( c = rel_peak , loc = lower_bound , scale = width )
Generate a frozen scipy.stats.triang distribution.
Generate a frozen scipy . stats . triang distribution .
"""
	Generate a frozen scipy.stats.triang distribution.

	This function provides the same actual distribution as ``triang``,
	but offers multiple intuitive ways to identify the peak and upper bound of the
	distribution, while ``triang`` is less flexible and intuitive (it must be defined
	using arguments labeled as 'c', 'loc', and 'scale').

	Args:
		lower_bound (numeric):
			The lower bound of the distribution.
		upper_bound (numeric, optional):
			The upper bound of the distribution.  Can be inferred
			from `width` if not given.
		rel_peak (numeric, optional):
			The relative position of the peak of the triangle.  Must
			be in the range (0,1).  If neither `peak` nor `rel_peak`
			is given, a default value of 0.5 is used.
		peak (numeric, optional):
			The location of the peak of the triangle, given as a particular
			value, which must be between the lower and upper bounds inclusive.
		width (numeric, optional):
			The distance between the lower and upper bounds.
			Can be inferred from those values if not given.

	Returns:
		scipy.stats.rv_frozen
	"""
None
lower_bound
The lower bound of the distribution.
The lower bound of the distribution .
upper_bound
The upper bound of the distribution.  Can be inferred
from `width` if not given.
The upper bound of the distribution . Can be inferred from ` width ` if not given .
rel_peak
The relative position of the peak of the triangle.  Must
be in the range (0,1).  If neither `peak` nor `rel_peak`
is given, a default value of 0.5 is used.
The relative position of the peak of the triangle . Must be in the range ( 0 1 ) . If neither ` peak ` nor ` rel_peak ` is given a default value of 0 . 5 is used .
peak
The location of the peak of the triangle, given as a particular
value, which must be between the lower and upper bounds inclusive.
The location of the peak of the triangle given as a particular value which must be between the lower and upper bounds inclusive .
width
The distance between the lower and upper bounds.
Can be inferred from those values if not given.
The distance between the lower and upper bounds . Can be inferred from those values if not given .