Simple Application Framework  1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Namespaces | Functions
Saf/Math/Range.h File Reference

Mathematical algorithms and functions that execute on a range of elements.
More...

#include "../Algo/Range.h"
#include "../Algo/Predicate.h"
#include "../Type/IteratorTraits.h"

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

Detailed Description

Mathematical algorithms and functions that execute on a range of elements.
Author:
Ondrej Danek ondre.nosp@m.j.da.nosp@m.nek@g.nosp@m.mail.nosp@m..com
Date:
2011