BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
An iterator for SimulationArea.
Definition at line 30 of file SimulationAreaIterator.h.
Public Types | |
enum | Mode { regionOfInterest , notMasked } |
Mode how the points shall be traversed. More... | |
Public Member Functions | |
SimulationAreaIterator | createEnd () const |
Convenience function to create an end-iterator matching to this iterator. More... | |
size_t | detectorIndex () const |
bool | operator!= (const SimulationAreaIterator &right) const |
SimulationAreaIterator & | operator++ () |
prefix increment More... | |
bool | operator== (const SimulationAreaIterator &other) const |
size_t | roiIndex () const |
Static Public Member Functions | |
static SimulationAreaIterator | createBegin (const IDetector *detector, Mode mode) |
Create begin-iterator to iterate over all points according to the given mode. More... | |
static SimulationAreaIterator | createEnd (const IDetector *detector, Mode mode) |
Create end-iterator to iterate over all points according to the given mode. More... | |
Private Member Functions | |
SimulationAreaIterator (const IDetector *detector, Mode mode, size_t start_at_index) | |
bool | isMasked (size_t index) const |
Check whether masked according to the actual mode (always false if mode is regionOfInterest). index is an ROI index. More... | |
size_t | nextIndex (size_t currentIndex) |
Private Attributes | |
const IDetector * | m_detector |
size_t | m_index |
ROI related index. More... | |
size_t | m_maxIndex |
ROI related maximum index. More... | |
Mode | m_mode |
Mode how the points shall be traversed.
Enumerator | |
---|---|
regionOfInterest | iterate over all points in "region of interest", no matter whether masked |
notMasked | iterate over all points in "region of interest" and not masked |
Definition at line 33 of file SimulationAreaIterator.h.
|
explicitprivate |
Definition at line 18 of file SimulationAreaIterator.cpp.
References isMasked(), m_index, m_maxIndex, and nextIndex().
Referenced by createBegin(), and createEnd().
|
static |
Create begin-iterator to iterate over all points according to the given mode.
Definition at line 33 of file SimulationAreaIterator.cpp.
References SimulationAreaIterator().
Referenced by IDetector::beginNonMaskedPoints(), and IDetector::beginRegionOfInterestPoints().
SimulationAreaIterator SimulationAreaIterator::createEnd | ( | ) | const |
Convenience function to create an end-iterator matching to this iterator.
Definition at line 43 of file SimulationAreaIterator.cpp.
References m_detector, and m_mode.
Referenced by IDetector::endNonMaskedPoints(), and IDetector::endRegionOfInterestPoints().
|
static |
Create end-iterator to iterate over all points according to the given mode.
Definition at line 38 of file SimulationAreaIterator.cpp.
References SimulationAreaIterator(), and IDetector::sizeOfRegionOfInterest().
size_t SimulationAreaIterator::detectorIndex | ( | ) | const |
Definition at line 53 of file SimulationAreaIterator.cpp.
References m_detector, m_index, and IDetector::regionOfInterestIndexToDetectorIndex().
Referenced by IDetector::active_indices(), and isMasked().
|
private |
Check whether masked according to the actual mode (always false if mode is regionOfInterest). index is an ROI index.
Definition at line 84 of file SimulationAreaIterator.cpp.
References detectorIndex(), IDetector::detectorMask(), m_detector, m_mode, regionOfInterest, and IDetector::regionOfInterestIndexToDetectorIndex().
Referenced by SimulationAreaIterator(), and nextIndex().
|
private |
Definition at line 67 of file SimulationAreaIterator.cpp.
References isMasked(), and m_maxIndex.
Referenced by SimulationAreaIterator(), and operator++().
|
inline |
Definition at line 79 of file SimulationAreaIterator.h.
SimulationAreaIterator & SimulationAreaIterator::operator++ | ( | ) |
prefix increment
Definition at line 58 of file SimulationAreaIterator.cpp.
References m_index, and nextIndex().
|
inline |
size_t SimulationAreaIterator::roiIndex | ( | ) | const |
Definition at line 48 of file SimulationAreaIterator.cpp.
References m_index.
Referenced by IDetector::applyDetectorResolution().
|
private |
Definition at line 68 of file SimulationAreaIterator.h.
Referenced by createEnd(), detectorIndex(), isMasked(), and operator==().
|
private |
ROI related index.
Definition at line 69 of file SimulationAreaIterator.h.
Referenced by SimulationAreaIterator(), detectorIndex(), operator++(), operator==(), and roiIndex().
|
private |
ROI related maximum index.
Definition at line 70 of file SimulationAreaIterator.h.
Referenced by SimulationAreaIterator(), and nextIndex().
|
private |
Definition at line 71 of file SimulationAreaIterator.h.
Referenced by createEnd(), isMasked(), and operator==().