
19 Jul
2008
19 Jul
'08
6:44 p.m.
Looks to me like you get O(n^2) instantiations of advance. You get N instantiations for the begin iterator, N-1 for the next and so on. What am I missing? -- Dave Abrahams Boostpro Computing http://boostpro.com On Jul 19, 2008, at 1:13 PM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
David Abrahams wrote:
How?
In pseudocode using iterators:
deref(advance(begin(tuple)), n)
where advance is implemented as
iterator advance(iterator x, int n) { if(n == 0) { return(x); } else { return(advance(x, n - 1)); } }
This way we maximize memoization for a single tuple.
In Christ, Steven Watanabe
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost