# openmc.stats.Uniform¶

class openmc.stats.Uniform(a=0.0, b=1.0)[source]

Distribution with constant probability over a finite interval [a,b]

Parameters: a (float, optional) – Lower bound of the sampling interval. Defaults to zero. b (float, optional) – Upper bound of the sampling interval. Defaults to unity. a (float) – Lower bound of the sampling interval b (float) – Upper bound of the sampling interval
classmethod from_xml_element(elem)[source]

Generate uniform distribution from an XML element

Parameters: elem (xml.etree.ElementTree.Element) – XML element Uniform distribution generated from XML element openmc.stats.Uniform
to_xml_element(element_name)[source]

Return XML representation of the uniform distribution

Parameters: element_name (str) – XML element name element – XML element containing uniform distribution data xml.etree.ElementTree.Element