Mantid
|
ExcludeRangeFinder : Helper clss that finds if a point should be excluded from fit. More...
#include <ExcludeRangeFinder.h>
Public Member Functions | |
ExcludeRangeFinder (const std::vector< double > &exclude, double startX, double endX) | |
Constructor. More... | |
bool | isExcluded (double value) |
Check if an x-value lies in an exclusion range. More... | |
Private Member Functions | |
void | findNextExcludedRange (double p) |
Find the range from m_exclude that may contain points x >= p. More... | |
Private Attributes | |
double | m_endExcludeRange |
End of current excluded range. More... | |
std::size_t | m_exclIndex |
Index of current excluded range. More... | |
const std::vector< double > | m_exclude |
Reference to a list of exclusion ranges. More... | |
const std::size_t | m_size |
Size of m_exclude. More... | |
double | m_startExcludedRange |
Start of current excluded range. More... | |
ExcludeRangeFinder : Helper clss that finds if a point should be excluded from fit.
It keeps the boundaries of the relevant exclusion region for the last checked value. A relevant region is the one which either includes the value or the nearest one with the left boundary greater than the value. The class also keeps the index of the region (its left boundary) for efficient search.
Definition at line 23 of file ExcludeRangeFinder.h.
Mantid::CurveFitting::ExcludeRangeFinder::ExcludeRangeFinder | ( | const std::vector< double > & | exclude, |
double | startX, | ||
double | endX | ||
) |
Constructor.
exclude | :: The value of the "Exclude" property. |
startX | :: The start of the overall fit interval. |
endX | :: The end of the overall fit interval. |
Definition at line 17 of file ExcludeRangeFinder.cpp.
References findNextExcludedRange(), m_exclIndex, and m_exclude.
|
private |
Find the range from m_exclude that may contain points x >= p.
Find the range from m_exclude that may contain points x >= p .
p | :: An x value to use in the seach. |
Definition at line 59 of file ExcludeRangeFinder.cpp.
References m_endExcludeRange, m_exclIndex, m_exclude, m_size, and m_startExcludedRange.
Referenced by ExcludeRangeFinder(), and isExcluded().
bool Mantid::CurveFitting::ExcludeRangeFinder::isExcluded | ( | double | value | ) |
Check if an x-value lies in an exclusion range.
value | :: A value to check. |
Definition at line 36 of file ExcludeRangeFinder.cpp.
References findNextExcludedRange(), isExcluded(), m_endExcludeRange, m_exclIndex, m_size, m_startExcludedRange, and value.
Referenced by Mantid::CurveFitting::FitMW::createDomain(), Mantid::CurveFitting::TableWorkspaceDomainCreator::createDomain(), and isExcluded().
|
private |
End of current excluded range.
Definition at line 39 of file ExcludeRangeFinder.h.
Referenced by findNextExcludedRange(), and isExcluded().
|
private |
Index of current excluded range.
Definition at line 35 of file ExcludeRangeFinder.h.
Referenced by ExcludeRangeFinder(), findNextExcludedRange(), and isExcluded().
|
private |
Reference to a list of exclusion ranges.
Definition at line 41 of file ExcludeRangeFinder.h.
Referenced by ExcludeRangeFinder(), and findNextExcludedRange().
|
private |
Size of m_exclude.
Definition at line 43 of file ExcludeRangeFinder.h.
Referenced by findNextExcludedRange(), and isExcluded().
|
private |
Start of current excluded range.
Definition at line 37 of file ExcludeRangeFinder.h.
Referenced by findNextExcludedRange(), and isExcluded().