Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::CurveFitting::ExcludeRangeFinder Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ExcludeRangeFinder()

Mantid::CurveFitting::ExcludeRangeFinder::ExcludeRangeFinder ( const std::vector< double > &  exclude,
double  startX,
double  endX 
)

Constructor.

Parameters
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.

Member Function Documentation

◆ findNextExcludedRange()

void Mantid::CurveFitting::ExcludeRangeFinder::findNextExcludedRange ( double  p)
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 .

Parameters
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().

◆ isExcluded()

bool Mantid::CurveFitting::ExcludeRangeFinder::isExcluded ( double  value)

Check if an x-value lies in an exclusion range.

Parameters
value:: A value to check.
Returns
true if the value lies in an exclusion range and should be excluded from fit.

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().

Member Data Documentation

◆ m_endExcludeRange

double Mantid::CurveFitting::ExcludeRangeFinder::m_endExcludeRange
private

End of current excluded range.

Definition at line 39 of file ExcludeRangeFinder.h.

Referenced by findNextExcludedRange(), and isExcluded().

◆ m_exclIndex

std::size_t Mantid::CurveFitting::ExcludeRangeFinder::m_exclIndex
private

Index of current excluded range.

Definition at line 35 of file ExcludeRangeFinder.h.

Referenced by ExcludeRangeFinder(), findNextExcludedRange(), and isExcluded().

◆ m_exclude

const std::vector<double> Mantid::CurveFitting::ExcludeRangeFinder::m_exclude
private

Reference to a list of exclusion ranges.

Definition at line 41 of file ExcludeRangeFinder.h.

Referenced by ExcludeRangeFinder(), and findNextExcludedRange().

◆ m_size

const std::size_t Mantid::CurveFitting::ExcludeRangeFinder::m_size
private

Size of m_exclude.

Definition at line 43 of file ExcludeRangeFinder.h.

Referenced by findNextExcludedRange(), and isExcluded().

◆ m_startExcludedRange

double Mantid::CurveFitting::ExcludeRangeFinder::m_startExcludedRange
private

Start of current excluded range.

Definition at line 37 of file ExcludeRangeFinder.h.

Referenced by findNextExcludedRange(), and isExcluded().


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