BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ZLimits.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file Sample/Scattering/ZLimits.h
6
//! @brief Defines class ZLimits.
7
//!
8
//! @homepage http://www.bornagainproject.org
9
//! @license GNU General Public License v3 or higher (see COPYING)
10
//! @copyright Forschungszentrum Jülich GmbH 2018
11
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12
//
13
// ************************************************************************************************
14
15
#ifdef SWIG
16
#error no need to expose this header to Swig
17
#endif
18
19
#ifndef USER_API
20
#ifndef BORNAGAIN_SAMPLE_SCATTERING_ZLIMITS_H
21
#define BORNAGAIN_SAMPLE_SCATTERING_ZLIMITS_H
22
23
#include <iostream>
24
25
//! Vertical extension of a particle, specified by bottom and top z coordinate.
26
struct
ParticleLimits
{
27
double
m_bottom
;
28
double
m_top
;
29
};
30
31
//! Helper class that represents a onesided limit
32
//!
33
//! @ingroup intern
34
35
struct
OneSidedLimit
{
36
bool
m_limitless
;
37
double
m_value
;
38
};
39
40
//! Class that contains upper and lower limits of the z-coordinate for the slicing of
41
//! form factors.
42
//!
43
//! @ingroup intern
44
45
class
ZLimits
{
46
public
:
47
ZLimits
();
48
ZLimits
(
double
min,
double
max);
49
ZLimits
(
OneSidedLimit
lower_limit,
OneSidedLimit
upper_limit);
50
51
bool
isFinite
()
const
;
52
53
OneSidedLimit
lowerLimit
()
const
;
54
OneSidedLimit
upperLimit
()
const
;
55
56
private
:
57
OneSidedLimit
m_lower
;
58
OneSidedLimit
m_upper
;
59
};
60
61
OneSidedLimit
MinLimit
(
const
OneSidedLimit
& left,
const
OneSidedLimit
& right);
62
OneSidedLimit
MaxLimit
(
const
OneSidedLimit
& left,
const
OneSidedLimit
& right);
63
bool
operator==
(
const
OneSidedLimit
& left,
const
OneSidedLimit
& right);
64
bool
operator!=
(
const
OneSidedLimit
& left,
const
OneSidedLimit
& right);
65
66
std::ostream&
operator<<
(std::ostream& ostr,
const
OneSidedLimit
& limit);
67
68
ZLimits
ConvexHull
(
const
ZLimits
& left,
const
ZLimits
& right);
69
bool
operator==
(
const
ZLimits
& left,
const
ZLimits
& right);
70
bool
operator!=
(
const
ZLimits
& left,
const
ZLimits
& right);
71
72
std::ostream&
operator<<
(std::ostream& ostr,
const
ZLimits
& limits);
73
74
#endif
// BORNAGAIN_SAMPLE_SCATTERING_ZLIMITS_H
75
#endif
// USER_API
MinLimit
OneSidedLimit MinLimit(const OneSidedLimit &left, const OneSidedLimit &right)
Definition:
ZLimits.cpp:49
ConvexHull
ZLimits ConvexHull(const ZLimits &left, const ZLimits &right)
Definition:
ZLimits.cpp:82
MaxLimit
OneSidedLimit MaxLimit(const OneSidedLimit &left, const OneSidedLimit &right)
Definition:
ZLimits.cpp:56
BasicVector3D::operator!=
bool operator!=(const BasicVector3D< T > &a, const BasicVector3D< T > &b)
Comparison of two vectors for inequality.
Definition:
BasicVector3D.h:288
BasicVector3D::operator==
bool operator==(const BasicVector3D< T > &a, const BasicVector3D< T > &b)
Comparison of two vectors for equality.
Definition:
BasicVector3D.h:281
BasicVector3D::operator<<
std::ostream & operator<<(std::ostream &os, const BasicVector3D< T > &a)
Output to stream.
Definition:
BasicVector3D.h:206
ZLimits
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Definition:
ZLimits.h:45
ZLimits::lowerLimit
OneSidedLimit lowerLimit() const
Definition:
ZLimits.cpp:39
ZLimits::upperLimit
OneSidedLimit upperLimit() const
Definition:
ZLimits.cpp:44
ZLimits::isFinite
bool isFinite() const
Definition:
ZLimits.cpp:32
ZLimits::m_upper
OneSidedLimit m_upper
Definition:
ZLimits.h:58
ZLimits::m_lower
OneSidedLimit m_lower
Definition:
ZLimits.h:57
ZLimits::ZLimits
ZLimits()
Definition:
ZLimits.cpp:19
OneSidedLimit
Helper class that represents a onesided limit.
Definition:
ZLimits.h:35
OneSidedLimit::m_value
double m_value
Definition:
ZLimits.h:37
OneSidedLimit::m_limitless
bool m_limitless
Definition:
ZLimits.h:36
ParticleLimits
Vertical extension of a particle, specified by bottom and top z coordinate.
Definition:
ZLimits.h:26
ParticleLimits::m_top
double m_top
Definition:
ZLimits.h:28
ParticleLimits::m_bottom
double m_bottom
Definition:
ZLimits.h:27
Sample
Scattering
ZLimits.h
Generated by
1.9.1