BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ZLimits Class Reference
Collaboration diagram for ZLimits:

Public Member Functions

 ZLimits ()
 
 ZLimits (double min, double max)
 
 ZLimits (OneSidedLimit lower_limit, OneSidedLimit upper_limit)
 
bool isFinite () const
 
OneSidedLimit lowerLimit () const
 
OneSidedLimit upperLimit () const
 

Private Attributes

OneSidedLimit m_lower
 
OneSidedLimit m_upper
 

Detailed Description

Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.

Definition at line 40 of file ZLimits.h.

Constructor & Destructor Documentation

◆ ZLimits() [1/3]

ZLimits::ZLimits ( )

Definition at line 19 of file ZLimits.cpp.

19 : m_lower{true, 0}, m_upper{true, 0} {}
OneSidedLimit m_upper
Definition: ZLimits.h:54
OneSidedLimit m_lower
Definition: ZLimits.h:53

◆ ZLimits() [2/3]

ZLimits::ZLimits ( double  min,
double  max 
)

Definition at line 21 of file ZLimits.cpp.

21 : ZLimits({false, min}, {false, max}) {}
ZLimits()
Definition: ZLimits.cpp:19

◆ ZLimits() [3/3]

ZLimits::ZLimits ( OneSidedLimit  lower_limit,
OneSidedLimit  upper_limit 
)

Definition at line 23 of file ZLimits.cpp.

24  : m_lower(std::move(lower_limit)), m_upper(std::move(upper_limit))
25 {
26  if (!lower_limit.m_limitless && !upper_limit.m_limitless
27  && lower_limit.m_value > upper_limit.m_value)
28  throw std::runtime_error("ZLimits constructor: "
29  "lower limit bigger than upper limit.");
30 }
double m_value
Definition: ZLimits.h:32
bool m_limitless
Definition: ZLimits.h:31

References OneSidedLimit::m_limitless, and OneSidedLimit::m_value.

Member Function Documentation

◆ isFinite()

bool ZLimits::isFinite ( ) const

◆ lowerLimit()

◆ upperLimit()

Member Data Documentation

◆ m_lower

OneSidedLimit ZLimits::m_lower
private

Definition at line 53 of file ZLimits.h.

Referenced by isFinite(), and lowerLimit().

◆ m_upper

OneSidedLimit ZLimits::m_upper
private

Definition at line 54 of file ZLimits.h.

Referenced by isFinite(), and upperLimit().


The documentation for this class was generated from the following files: