diff --git a/doc/html/fusion/algorithm/iteration/functions/iter_fold.html b/doc/html/fusion/algorithm/iteration/functions/iter_fold.html new file mode 100644 index 00000000..3999f587 --- /dev/null +++ b/doc/html/fusion/algorithm/iteration/functions/iter_fold.html @@ -0,0 +1,253 @@ + + + +iter_fold + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+iter_fold +
+

+ +

+
+ + Description +
+

+

+

+ For a sequence seq, + initial state initial_state, + and binary function object or function pointer f, + iter_fold returns the result of the repeated application + of binary f to the + result of the previous f + invocation (inital_state + if it is the first call) and iterators on each element of seq. +

+

+ +

+
+ + Synopsis +
+

+ +

+
template<
+    typename Sequence,
+    typename State,
+    typename F
+    >
+typename result_of::iter_fold<Sequence, State const, F>::type iter_fold(
+    Sequence& seq, State const& initial_state, F f);
+    
+template<
+    typename Sequence,
+    typename State,
+    typename F
+    >
+typename result_of::iter_fold<Sequence const, State const, F>::type iter_fold(
+    Sequence const& seq, State const& initial_state, F f);
+
+

+

+
+

Table 1.39. Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +
+

+ Parameter +

+
+

+ Requirement +

+
+

+ Description +

+
+

+ seq +

+
+

+ A model of Forward + Sequence +

+
+

+ Operation's argument +

+
+

+ initial_state +

+
+

+ Any type +

+
+

+ Initial state +

+
+

+ f +

+
+

+ f(s,it) with return type boost::result_of<F(S,It)>::type must be a valid expression + for current state s + of type S, + and for each iterator it + of type It + on an element of seq +

+
+

+ Operation's argument +

+
+
+


+ +

+
+ + Expression + Semantics +
+

+ +

+
iter_fold(seq, initial_state, f);
+
+

+

+

+ Return type: Any type +

+

+

+

+ Semantics: Equivalent to f(... + f(f(initial_state,it1),it2) ...itN) where it1 ...itN + are consecutive iterators on the elements of seq. +

+

+ +

+
+ + Complexity +
+

+

+

+ Linear, exactly result_of::size<Sequence>::value applications of f. +

+

+ +

+
+ + Header +
+

+ +

+
#include <boost/fusion/algorithm/iteration/iter_fold.hpp>
+#include <boost/fusion/include/iter_fold.hpp>
+
+

+ +

+
+ + Example +
+

+ +

+
struct make_string
+{
+    typedef std::string result_type;
+
+    template<typename T>
+    std::string operator()(const std::string& str, const T& t) const
+    {
+        return str + boost::lexical_cast<std::string>(deref(t));
+    }
+};
+...
+const vector<int,int> vec(1,2);
+assert(iter_fold(vec,std::string(""), make_string()) == "12");
+
+

+

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/algorithm/iteration/functions/reverse_fold.html b/doc/html/fusion/algorithm/iteration/functions/reverse_fold.html new file mode 100644 index 00000000..184365dc --- /dev/null +++ b/doc/html/fusion/algorithm/iteration/functions/reverse_fold.html @@ -0,0 +1,253 @@ + + + +reverse_fold + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+reverse_fold +
+

+ +

+
+ + Description +
+

+

+

+ For a sequence seq, + initial state initial_state, + and binary function object or function pointer f, + reverse_fold returns the result of the repeated + application of binary f + to the result of the previous f + invocation (inital_state + if it is the first call) and each element of seq. +

+

+ +

+
+ + Synopsis +
+

+ +

+
template<
+    typename Sequence,
+    typename State,
+    typename F
+    >
+typename result_of::reverse_fold<Sequence, State const, F>::type reverse_fold(
+    Sequence& seq, State const& initial_state, F f);
+    
+template<
+    typename Sequence,
+    typename State,
+    typename F
+    >
+typename result_of::reverse_fold<Sequence const, State const, F>::type reverse_fold(
+    Sequence const& seq, State const& initial_state, F f);
+
+

+

+
+

Table 1.38. Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +
+

+ Parameter +

+
+

+ Requirement +

+
+

+ Description +

+
+

+ seq +

+
+

+ A model of Forward + Sequence +

+
+

+ Operation's argument +

+
+

+ initial_state +

+
+

+ Any type +

+
+

+ Initial state +

+
+

+ f +

+
+

+ f(s,e) with return type boost::result_of<F(S,E)>::type must be a valid expression + for current state s + of type S, + and for each element e + of type E + in seq +

+
+

+ Operation's argument +

+
+
+


+ +

+
+ + Expression + Semantics +
+

+ +

+
reverse_fold(seq, initial_state, f);
+
+

+

+

+ Return type: Any type +

+

+

+

+ Semantics: Equivalent to f(... + f(f(initial_state,eN),eN-1) ...e1) where e1 ...eN + are the consecutive elements of seq. +

+

+ +

+
+ + Complexity +
+

+

+

+ Linear, exactly result_of::size<Sequence>::value applications of f. +

+

+ +

+
+ + Header +
+

+ +

+
#include <boost/fusion/algorithm/iteration/reverse_fold.hpp>
+#include <boost/fusion/include/reverse_fold.hpp>
+
+

+ +

+
+ + Example +
+

+ +

+
struct make_string
+{
+    typedef std::string result_type;
+
+    template<typename T>
+    std::string operator()(const std::string& str, const T& t) const
+    {
+        return str + boost::lexical_cast<std::string>(t);
+    }
+};
+...
+const vector<int,int> vec(1,2);
+assert(reverse_fold(vec,std::string(""), make_string()) == "21");
+
+

+

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/algorithm/iteration/functions/reverse_iter_fold.html b/doc/html/fusion/algorithm/iteration/functions/reverse_iter_fold.html new file mode 100644 index 00000000..54c8bdca --- /dev/null +++ b/doc/html/fusion/algorithm/iteration/functions/reverse_iter_fold.html @@ -0,0 +1,253 @@ + + + +reverse_iter_fold + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+reverse_iter_fold +
+

+ +

+
+ + Description +
+

+

+

+ For a sequence seq, + initial state initial_state, + and binary function object or function pointer f, + reverse_iter_fold returns the result of the repeated + application of binary f + to the result of the previous f + invocation (inital_state + if it is the first call) and iterators on each element of seq. +

+

+ +

+
+ + Synopsis +
+

+ +

+
template<
+    typename Sequence,
+    typename State,
+    typename F
+    >
+typename result_of::reverse_iter_fold<Sequence, State const, F>::type reverse_iter_fold(
+    Sequence& seq, State const& initial_state, F f);
+    
+template<
+    typename Sequence,
+    typename State,
+    typename F
+    >
+typename result_of::reverse_iter_fold<Sequence const, State const, F>::type reverse_iter_fold(
+    Sequence const& seq, State const& initial_state, F f);
+
+

+

+
+

Table 1.40. Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +
+

+ Parameter +

+
+

+ Requirement +

+
+

+ Description +

+
+

+ seq +

+
+

+ A model of Forward + Sequence +

+
+

+ Operation's argument +

+
+

+ initial_state +

+
+

+ Any type +

+
+

+ Initial state +

+
+

+ f +

+
+

+ f(s,it) with return type boost::result_of<F(S,It)>::type must be a valid expression + for current state s + of type S, + and for each iterator it + of type It + on an element of seq +

+
+

+ Operation's argument +

+
+
+


+ +

+
+ + Expression + Semantics +
+

+ +

+
reverse_iter_fold(seq, initial_state, f);
+
+

+

+

+ Return type: Any type +

+

+

+

+ Semantics: Equivalent to f(... + f(f(initial_state,itN),itN-1) ...it1) where it1 + ...itN are consecutive iterators on the elements of seq. +

+

+ +

+
+ + Complexity +
+

+

+

+ Linear, exactly result_of::size<Sequence>::value applications of f. +

+

+ +

+
+ + Header +
+

+ +

+
#include <boost/fusion/algorithm/iteration/reverse_iter_fold.hpp>
+#include <boost/fusion/include/reverse_iter_fold.hpp>
+
+

+ +

+
+ + Example +
+

+ +

+
struct make_string
+{
+    typedef std::string result_type;
+
+    template<typename T>
+    std::string operator()(const std::string& str, const T& t) const
+    {
+        return str + boost::lexical_cast<std::string>(deref(t));
+    }
+};
+...
+const vector<int,int> vec(1,2);
+assert(reverse_iter_fold(vec,std::string(""), make_string()) == "21");
+
+

+

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/iter_fold.html b/doc/html/fusion/algorithm/iteration/metafunctions/iter_fold.html new file mode 100644 index 00000000..d07c9c4a --- /dev/null +++ b/doc/html/fusion/algorithm/iteration/metafunctions/iter_fold.html @@ -0,0 +1,213 @@ + + + +iter_fold + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+iter_fold +
+

+ +

+
+ + Description +
+

+

+

+ Returns the result type of iter_fold. +

+

+ +

+
+ + Synopsis +
+

+ +

+
template<
+    typename Sequence,
+    typename State,
+    typename F>
+struct iter_fold
+{
+    typedef unspecified type;
+};
+
+

+

+
+

Table 1.45. Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +
+

+ Parameter +

+
+

+ Requirement +

+
+

+ Description +

+
+

+ Sequence +

+
+

+ A model of Forward + Sequence +

+
+

+ The sequence to iterate +

+
+

+ State +

+
+

+ Any type +

+
+

+ The initial state for the first application of F +

+
+

+ F +

+
+

+ boost::result_of<F(S,It)>::type is the return type + of f(s,it) with current state s of type S, and an iterator it of type It on an element of seq +

+
+

+ The operation to be applied on traversal +

+
+
+


+ +

+
+ + Expression + Semantics +
+

+ +

+
iter_fold<Sequence, State, F>::type
+
+

+

+

+ Return type: Any type +

+

+

+

+ Semantics: Returns the result of applying + iter_fold to a sequence of + type Sequence, with + an initial state of type State + and binary function object or function pointer of type F. +

+

+ +

+
+ + Complexity +
+

+

+

+ Linear, exactly result_of::size<Sequence>::value applications of F. +

+

+ +

+
+ + Header +
+

+ +

+
#include <boost/fusion/algorithm/iteration/iter_fold.hpp>
+#include <boost/fusion/include/iter_fold.hpp>
+
+

+

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/reverse_fold.html b/doc/html/fusion/algorithm/iteration/metafunctions/reverse_fold.html new file mode 100644 index 00000000..771ff2f6 --- /dev/null +++ b/doc/html/fusion/algorithm/iteration/metafunctions/reverse_fold.html @@ -0,0 +1,213 @@ + + + +reverse_fold + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+reverse_fold +
+

+ +

+
+ + Description +
+

+

+

+ Returns the result type of reverse_fold. +

+

+ +

+
+ + Synopsis +
+

+ +

+
template<
+    typename Sequence,
+    typename State,
+    typename F>
+struct reverse_fold
+{
+    typedef unspecified type;
+};
+
+

+

+
+

Table 1.44. Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +
+

+ Parameter +

+
+

+ Requirement +

+
+

+ Description +

+
+

+ Sequence +

+
+

+ A model of Forward + Sequence +

+
+

+ The sequence to iterate +

+
+

+ State +

+
+

+ Any type +

+
+

+ The initial state for the first application of F +

+
+

+ F +

+
+

+ boost::result_of<F(S,E)>::type is the return type + of f(s,e) with current state s of type S, and an element e of type E in seq +

+
+

+ The operation to be applied on traversal +

+
+
+


+ +

+
+ + Expression + Semantics +
+

+ +

+
reverse_fold<Sequence, State, F>::type
+
+

+

+

+ Return type: Any type +

+

+

+

+ Semantics: Returns the result of applying + reverse_fold to a sequence + of type Sequence, with + an initial state of type State + and binary function object or function pointer of type F. +

+

+ +

+
+ + Complexity +
+

+

+

+ Linear, exactly result_of::size<Sequence>::value applications of F. +

+

+ +

+
+ + Header +
+

+ +

+
#include <boost/fusion/algorithm/iteration/reverse_fold.hpp>
+#include <boost/fusion/include/reverse_fold.hpp>
+
+

+

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/fusion/algorithm/iteration/metafunctions/reverse_iter_fold.html b/doc/html/fusion/algorithm/iteration/metafunctions/reverse_iter_fold.html new file mode 100644 index 00000000..e950bb7b --- /dev/null +++ b/doc/html/fusion/algorithm/iteration/metafunctions/reverse_iter_fold.html @@ -0,0 +1,213 @@ + + + +reverse_iter_fold + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+reverse_iter_fold +
+

+ +

+
+ + Description +
+

+

+

+ Returns the result type of reverse_iter_fold. +

+

+ +

+
+ + Synopsis +
+

+ +

+
template<
+    typename Sequence,
+    typename State,
+    typename F>
+struct reverse_iter_fold
+{
+    typedef unspecified type;
+};
+
+

+

+
+

Table 1.46. Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +
+

+ Parameter +

+
+

+ Requirement +

+
+

+ Description +

+
+

+ Sequence +

+
+

+ A model of Forward + Sequence +

+
+

+ The sequence to iterate +

+
+

+ State +

+
+

+ Any type +

+
+

+ The initial state for the first application of F +

+
+

+ F +

+
+

+ boost::result_of<F(S,It)>::type is the return type + of f(s,it) with current state s of type S, and an iterator it of type It on an element of seq +

+
+

+ The operation to be applied on traversal +

+
+
+


+ +

+
+ + Expression + Semantics +
+

+ +

+
reverse_iter_fold<Sequence, State, F>::type
+
+

+

+

+ Return type: Any type +

+

+

+

+ Semantics: Returns the result of applying + reverse_iter_fold to a sequence + of type Sequence, with + an initial state of type State + and binary function object or function pointer of type F. +

+

+ +

+
+ + Complexity +
+

+

+

+ Linear, exactly result_of::size<Sequence>::value applications of F. +

+

+ +

+
+ + Header +
+

+ +

+
#include <boost/fusion/algorithm/iteration/reverse_iter_fold.hpp>
+#include <boost/fusion/include/reverse_iter_fold.hpp>
+
+

+

+
+ + + +
+
+
+PrevUpHomeNext +
+ +