BornAgain
1.18.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 scattering at grazing incidence
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
#ifndef BORNAGAIN_CORE_SCATTERING_ZLIMITS_H
16
#define BORNAGAIN_CORE_SCATTERING_ZLIMITS_H
17
18
#include <iostream>
19
20
//! Vertical extension of a particle, specified by bottom and top z coordinate.
21
struct
ParticleLimits
{
22
double
m_bottom;
23
double
m_top;
24
};
25
26
//! Helper class that represents a onesided limit
27
//!
28
//! @ingroup intern
29
30
struct
OneSidedLimit
{
31
bool
m_limitless;
32
double
m_value;
33
};
34
35
//! Class that contains upper and lower limits of the z-coordinate for the slicing of
36
//! form factors.
37
//!
38
//! @ingroup intern
39
40
class
ZLimits
41
{
42
public
:
43
ZLimits
();
44
ZLimits
(
double
min,
double
max);
45
ZLimits
(
OneSidedLimit
lower_limit,
OneSidedLimit
upper_limit);
46
47
bool
isFinite()
const
;
48
49
OneSidedLimit
lowerLimit()
const
;
50
OneSidedLimit
upperLimit()
const
;
51
52
private
:
53
OneSidedLimit
m_lower;
54
OneSidedLimit
m_upper;
55
};
56
57
OneSidedLimit
MinLimit(
const
OneSidedLimit
& left,
const
OneSidedLimit
& right);
58
OneSidedLimit
MaxLimit(
const
OneSidedLimit
& left,
const
OneSidedLimit
& right);
59
bool
operator==
(
const
OneSidedLimit
& left,
const
OneSidedLimit
& right);
60
bool
operator!=
(
const
OneSidedLimit
& left,
const
OneSidedLimit
& right);
61
62
std::ostream&
operator<<
(std::ostream& ostr,
const
OneSidedLimit
& limit);
63
64
ZLimits
ConvexHull(
const
ZLimits
& left,
const
ZLimits
& right);
65
bool
operator==
(
const
ZLimits
& left,
const
ZLimits
& right);
66
bool
operator!=
(
const
ZLimits
& left,
const
ZLimits
& right);
67
68
std::ostream&
operator<<
(std::ostream& ostr,
const
ZLimits
& limits);
69
70
#endif
// BORNAGAIN_CORE_SCATTERING_ZLIMITS_H
BasicVector3D::operator!=
bool operator!=(const BasicVector3D< T > &a, const BasicVector3D< T > &b)
Comparison of two vectors for inequality.
Definition:
BasicVector3D.h:289
BasicVector3D::operator==
bool operator==(const BasicVector3D< T > &a, const BasicVector3D< T > &b)
Comparison of two vectors for equality.
Definition:
BasicVector3D.h:282
BasicVector3D::operator<<
std::ostream & operator<<(std::ostream &os, const BasicVector3D< T > &a)
Output to stream.
Definition:
BasicVector3D.h:207
ZLimits
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Definition:
ZLimits.h:41
OneSidedLimit
Helper class that represents a onesided limit.
Definition:
ZLimits.h:30
ParticleLimits
Vertical extension of a particle, specified by bottom and top z coordinate.
Definition:
ZLimits.h:21
Sample
Scattering
ZLimits.h
Generated by
1.9.1