BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Some additions to standard library algorithms. More...
Functions | |
bool | almostEqual (double a, double b) |
Returns true if two doubles agree within machine epsilon. More... | |
template<class T > | |
std::vector< T > | concat (const std::vector< T > &v1, const std::vector< T > &v2) |
Returns the concatenation of two std::vectors. More... | |
template<typename Evaluator , typename Iterator > | |
double | max_value (const Iterator &begin, const Iterator &end, const Evaluator &evaluate) |
Returns the maximum value of function evaluate as applied to the elements of an iterator range. More... | |
template<typename Evaluator , typename Iterator > | |
double | min_value (const Iterator &begin, const Iterator &end, const Evaluator &evaluate) |
Returns the minimum value of function evaluate as applied to the elements of an iterator range. More... | |
Some additions to standard library algorithms.
|
inline |
Returns true if two doubles agree within machine epsilon.
Definition at line 34 of file Algorithms.h.
Referenced by VerticalLine::contains(), HorizontalLine::contains(), CustomBinAxis::equals(), FixedBinAxis::equals(), VariableBinAxis::equals(), ConstKBinAxis::equals(), pyfmt::isHexagonal(), and pyfmt::isSquare().
std::vector< T > algo::concat | ( | const std::vector< T > & | v1, |
const std::vector< T > & | v2 | ||
) |
Returns the concatenation of two std::vectors.
Definition at line 79 of file Algorithms.h.
Referenced by nodeMetaUnion().
double algo::max_value | ( | const Iterator & | begin, |
const Iterator & | end, | ||
const Evaluator & | evaluate | ||
) |
Returns the maximum value of function evaluate as applied to the elements of an iterator range.
Definition at line 69 of file Algorithms.h.
References ASSERT.
Referenced by FormFactorWeighted::topZ(), and IBornFF::TopZ().
double algo::min_value | ( | const Iterator & | begin, |
const Iterator & | end, | ||
const Evaluator & | evaluate | ||
) |
Returns the minimum value of function evaluate as applied to the elements of an iterator range.
Definition at line 58 of file Algorithms.h.
References ASSERT.
Referenced by FormFactorWeighted::bottomZ(), IBornFF::BottomZ(), and TestMinimizer::minimize_scalar().