BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Functions | |
bool | almostEqual (double a, double b) |
template<typename Evaluator , typename Iterator > | |
double | min_value (const Iterator &begin, const Iterator &end, const Evaluator &evaluate) |
template<typename Evaluator , typename Iterator > | |
double | max_value (const Iterator &begin, const Iterator &end, const Evaluator &evaluate) |
template<class T > | |
std::vector< T > | concat (const std::vector< T > &v1, const std::vector< T > &v2) |
Some additions to standard library algorithms.
|
inline |
Returns true if two doubles agree within machine epsilon.
Definition at line 30 of file Algorithms.h.
References anonymous_namespace{PolyhedralComponents.cpp}::eps.
Referenced by VerticalLine::contains(), HorizontalLine::contains(), CustomBinAxis::equals(), FixedBinAxis::equals(), VariableBinAxis::equals(), ConstKBinAxis::equals(), anonymous_namespace{SimulationToPython.cpp}::isDefaultDirection(), pyfmt::isHexagonal(), and pyfmt::isSquare().
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 54 of file Algorithms.h.
References ASSERT.
Referenced by FormFactorWeighted::bottomZ(), IFormFactorBorn::BottomZ(), and TestMinimizer::minimize_scalar().
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 65 of file Algorithms.h.
References ASSERT.
Referenced by FormFactorWeighted::topZ(), and IFormFactorBorn::TopZ().
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 75 of file Algorithms.h.
Referenced by nodeMetaUnion().