DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
// (C) Copyright Jeremy Siek 2001. // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ #ifndef BOOST_ALGORITHM_HPP # define BOOST_ALGORITHM_HPP # include
// Algorithms on sequences // // The functions in this file have not yet gone through formal // review, and are subject to change. This is a work in progress. // They have been checked into the detail directory because // there are some graph algorithms that use these functions. #include
#include
namespace boost { template
Iter1 begin(const std::pair
& p) { return p.first; } template
Iter2 end(const std::pair
& p) { return p.second; } template
typename boost::detail::iterator_traits
::difference_type size(const std::pair
& p) { return std::distance(p.first, p.second); } #if 0 // These seem to interfere with the std::pair overloads :( template
typename Container::iterator begin(Container& c) { return c.begin(); } template
typename Container::const_iterator begin(const Container& c) { return c.begin(); } template
typename Container::iterator end(Container& c) { return c.end(); } template
typename Container::const_iterator end(const Container& c) { return c.end(); } template
typename Container::size_type size(const Container& c) { return c.size(); } #else template
typename std::vector
::iterator begin(std::vector
& c) { return c.begin(); } template
typename std::vector
::const_iterator begin(const std::vector
& c) { return c.begin(); } template
typename std::vector
::iterator end(std::vector
& c) { return c.end(); } template
typename std::vector
::const_iterator end(const std::vector
& c) { return c.end(); } template
typename std::vector
::size_type size(const std::vector
& c) { return c.size(); } #endif template
void iota(ForwardIterator first, ForwardIterator last, T value) { for (; first != last; ++first, ++value) *first = value; } template
void iota(Container& c, const T& value) { iota(begin(c), end(c), value); } // Also do version with 2nd container? template
OutIter copy(const Container& c, OutIter result) { return std::copy(begin(c), end(c), result); } template
bool equal(const Container1& c1, const Container2& c2) { if (size(c1) != size(c2)) return false; return std::equal(begin(c1), end(c1), begin(c2)); } template
void sort(Container& c) { std::sort(begin(c), end(c)); } template
void sort(Container& c, const Predicate& p) { std::sort(begin(c), end(c), p); } template
void stable_sort(Container& c) { std::stable_sort(begin(c), end(c)); } template
void stable_sort(Container& c, const Predicate& p) { std::stable_sort(begin(c), end(c), p); } template
bool any_if(InputIterator first, InputIterator last, Predicate p) { return std::find_if(first, last, p) != last; } template
bool any_if(const Container& c, Predicate p) { return any_if(begin(c), end(c), p); } template
bool container_contains(InputIterator first, InputIterator last, T value) { return std::find(first, last, value) != last; } template
bool container_contains(const Container& c, const T& value) { return container_contains(begin(c), end(c), value); } template
std::size_t count(const Container& c, const T& value) { return std::count(begin(c), end(c), value); } template
std::size_t count_if(const Container& c, Predicate p) { return std::count_if(begin(c), end(c), p); } template
bool is_sorted(ForwardIterator first, ForwardIterator last) { if (first == last) return true; ForwardIterator next = first; for (++next; next != last; first = next, ++next) { if (*next < *first) return false; } return true; } template
bool is_sorted(ForwardIterator first, ForwardIterator last, StrictWeakOrdering comp) { if (first == last) return true; ForwardIterator next = first; for (++next; next != last; first = next, ++next) { if (comp(*next, *first)) return false; } return true; } template
bool is_sorted(const Container& c) { return is_sorted(begin(c), end(c)); } template
bool is_sorted(const Container& c, StrictWeakOrdering comp) { return is_sorted(begin(c), end(c), comp); } } // namespace boost #endif // BOOST_ALGORITHM_HPP
algorithm.hpp
Page URL
File URL
Prev 1/61
Next
Download
( 6 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.