Simple Application Framework
1
|
Mathematical algorithms and functions that execute on a range of elements.
Go to the source code of this file.
Namespaces | |
namespace | Saf |
Global library namespace. | |
namespace | Saf::Math |
Mathematical functions and structures. | |
namespace | Saf::Math::Range |
Mathematical algorithms and functions that execute on a range of elements. | |
Functions | |
template<class FwdIter , class Val , class Comp > | |
FwdIter | Saf::Math::Range::LowerBound (FwdIter begin, FwdIter end, const Val &val, Comp comp) |
Finds the furthermost iterator lb in the range [begin, end] such that for any iterator it in the range [begin, lb) it holds that comp(*it, val) == true . | |
template<class FwdIter , class Val > | |
FwdIter | Saf::Math::Range::LowerBound (FwdIter begin, FwdIter end, const Val &val) |
Finds the furthermost iterator lb in the range [begin, end] such that for any iterator it in the range [begin, lb) it holds that *it < val . | |
template<class FwdIter > | |
Type::IteratorTraits< FwdIter > ::ValType | Saf::Math::Range::Product (FwdIter begin, FwdIter end) |
Compute the product of elements in the range [begin, end) . | |
template<class FwdIter > | |
Type::IteratorTraits< FwdIter > ::ValType | Saf::Math::Range::Sum (FwdIter begin, FwdIter end) |
Compute the sum of elements in the range [begin, end) . | |
template<class FwdIter , class Val , class Comp > | |
FwdIter | Saf::Math::Range::UpperBound (FwdIter begin, FwdIter end, const Val &val, Comp comp) |
Finds the furthermost iterator ub in the range [begin, end] such that for any iterator it in the range [begin, ub) it holds that comp(val, *it) == false . | |
template<class FwdIter , class Val > | |
FwdIter | Saf::Math::Range::UpperBound (FwdIter begin, FwdIter end, const Val &val) |
Finds the furthermost iterator ub in the range [begin, end] such that for any iterator it in the range [begin, ub) it holds that !(val < *it) . |
Mathematical algorithms and functions that execute on a range of elements.