stlab.adobe.com Adobe Systems Incorporated

iota.hpp

Go to the documentation of this file.
00001 /*
00002     Copyright 2005-2007 Adobe Systems Incorporated
00003     Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
00004     or a copy at http://stlab.adobe.com/licenses.html)
00005 */
00006 
00007 /*************************************************************************************************/
00008 
00009 #ifndef ADOBE_ALGORITHM_IOTA_HPP
00010 #define ADOBE_ALGORITHM_IOTA_HPP
00011 
00012 #include <adobe/config.hpp>
00013 
00014 #include <adobe/functional.hpp>
00015 
00016 #include <boost/range/begin.hpp>
00017 #include <boost/range/end.hpp>
00018 
00019 #include <algorithm>
00020 
00021 /*************************************************************************************************/
00022 
00023 namespace adobe {
00024 
00025 /*************************************************************************************************/
00045 /*************************************************************************************************/
00051 template <class ForwardIterator, class T>
00052 void iota (ForwardIterator first, ForwardIterator last, const T& value)
00053 {
00054     std::generate(first, last, adobe::sequence_t<T>(value));
00055 }
00056 
00062 template <class ForwardRange, class T>
00063 void iota (ForwardRange& range, const T& value)
00064 {
00065     adobe::iota(boost::begin(range), boost::end(range), value);
00066 }
00067 
00068 /*************************************************************************************************/
00069 
00070 } // namespace adobe
00071 
00072 /*************************************************************************************************/
00073 
00074 #endif
00075 
00076 /*************************************************************************************************/

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google