Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion openmc/stats/univariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,18 @@ def mean(self) -> float:
"""
return 0.5 * (self.a + self.b)

def integral(self) -> float:
"""Return integral of the uniform distribution

.. versionadded:: 0.15.3

Returns
-------
float
Integral of uniform distribution
"""
return self.b - self.a

def to_xml_element(self, element_name: str):
"""Return XML representation of the uniform distribution

Expand Down Expand Up @@ -1163,7 +1175,7 @@ def integral(self):
Returns
-------
float
Integral of tabular distrbution
Integral of tabular distribution
"""
if self.interpolation == 'histogram':
return np.sum(np.diff(self.x) * self.p[:self.x.size-1])
Expand Down
Loading