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
//======================================================================= // Copyright 1997, 1998, 1999, 2000 University of Notre Dame. // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= // #ifndef BOOST_GRAPH_EDGE_LIST_HPP #define BOOST_GRAPH_EDGE_LIST_HPP #include
#include
#include
#include
#include
#include
#include
namespace boost { // // The edge_list class is an EdgeListGraph module that is constructed // from a pair of iterators whose value type is a pair of vertex // descriptors. // // For example: // // typedef std::pair
E; // list
elist; // ... // typedef edge_list
::iterator> Graph; // Graph g(elist.begin(), elist.end()); // // If the iterators are random access, then Graph::edge_descriptor // is of Integral type, otherwise it is a struct, though it is // convertible to an Integral type. // struct edge_list_tag { }; // The implementation class for edge_list. template
class edge_list_impl { public: typedef D edge_id; typedef T Vpair; typedef typename Vpair::first_type V; typedef V vertex_descriptor; typedef edge_list_tag graph_tag; typedef void edge_property_type; struct edge_descriptor { edge_descriptor() { } edge_descriptor(EdgeIter p, edge_id id) : _ptr(p), _id(id) { } operator edge_id() { return _id; } EdgeIter _ptr; edge_id _id; }; typedef edge_descriptor E; struct edge_iterator { typedef edge_iterator self; typedef E value_type; typedef E& reference; typedef E* pointer; typedef std::ptrdiff_t difference_type; typedef std::input_iterator_tag iterator_category; edge_iterator() { } edge_iterator(EdgeIter iter) : _iter(iter), _i(0) { } E operator*() { return E(_iter, _i); } self& operator++() { ++_iter; ++_i; return *this; } self operator++(int) { self t = *this; ++(*this); return t; } bool operator==(const self& x) { return _iter == x._iter; } bool operator!=(const self& x) { return _iter != x._iter; } EdgeIter _iter; edge_id _i; }; typedef void out_edge_iterator; typedef void in_edge_iterator; typedef void adjacency_iterator; typedef void vertex_iterator; }; template
std::pair
::edge_iterator, typename edge_list_impl
::edge_iterator> edges(const edge_list_impl
& g_) { const G& g = static_cast
(g_); typedef typename edge_list_impl
::edge_iterator edge_iterator; return std::make_pair(edge_iterator(g._first), edge_iterator(g._last)); } template
typename edge_list_impl
::vertex_descriptor source(typename edge_list_impl
::edge_descriptor e, const edge_list_impl
&) { return (*e._ptr).first; } template
typename edge_list_impl
::vertex_descriptor target(typename edge_list_impl
::edge_descriptor e, const edge_list_impl
&) { return (*e._ptr).second; } template
class el_edge_property_map : public put_get_helper
>{ public: typedef E key_type; typedef D value_type; typedef D reference; typedef readable_property_map_tag category; value_type operator[](key_type e) const { return e._i; } }; struct edge_list_edge_property_selector { template
struct bind_ { typedef el_edge_property_map
type; typedef type const_type; }; }; template <> struct edge_property_selector
{ typedef edge_list_edge_property_selector type; }; template
typename property_map< edge_list_impl
, edge_index_t>::type get(edge_index_t, const edge_list_impl
&) { typedef typename property_map< edge_list_impl
, edge_index_t>::type EdgeIndexMap; return EdgeIndexMap(); } template
inline D get(edge_index_t, const edge_list_impl
&, typename edge_list_impl
::edge_descriptor e) { return e._i; } // A specialized implementation for when the iterators are random access. struct edge_list_ra_tag { }; template
class edge_list_impl_ra { public: typedef D edge_id; typedef T Vpair; typedef typename Vpair::first_type V; typedef edge_list_ra_tag graph_tag; typedef void edge_property_type; typedef edge_id edge_descriptor; typedef V vertex_descriptor; typedef typename boost::integer_range
::iterator edge_iterator; typedef void out_edge_iterator; typedef void in_edge_iterator; typedef void adjacency_iterator; typedef void vertex_iterator; }; template
std::pair
::edge_iterator, typename edge_list_impl_ra
::edge_iterator> edges(const edge_list_impl_ra
& g_) { const G& g = static_cast
(g_); typedef typename edge_list_impl_ra
::edge_iterator edge_iterator; return std::make_pair(edge_iterator(0), edge_iterator(g._last - g._first)); } template
typename edge_list_impl_ra
::vertex_descriptor source(typename edge_list_impl_ra
::edge_descriptor e, const edge_list_impl_ra
& g_) { const G& g = static_cast
(g_); return g._first[e].first; } template
typename edge_list_impl_ra
::vertex_descriptor target(typename edge_list_impl_ra
::edge_descriptor e, const edge_list_impl_ra
& g_) { const G& g = static_cast
(g_); return g._first[e].second; } template
class el_ra_edge_property_map : public put_get_helper
>{ public: typedef E key_type; typedef E value_type; typedef E reference; typedef readable_property_map_tag category; value_type operator[](key_type e) const { return e; } }; struct edge_list_ra_edge_property_selector { template
struct bind_ { typedef el_ra_edge_property_map
type; typedef type const_type; }; }; template <> struct edge_property_selector
{ typedef edge_list_ra_edge_property_selector type; }; template
inline typename property_map< edge_list_impl_ra
, edge_index_t>::type get(edge_index_t, const edge_list_impl_ra
&) { typedef typename property_map< edge_list_impl_ra
, edge_index_t>::type EdgeIndexMap; return EdgeIndexMap(); } template
inline D get(edge_index_t, const edge_list_impl_ra
&, typename edge_list_impl_ra
::edge_descriptor e) { return e; } // Some helper classes for determining if the iterators are random access template
struct is_random { enum { RET = false }; typedef mpl::false_ type; }; template <> struct is_random
{ enum { RET = true }; typedef mpl::true_ type; }; // The edge_list class conditionally inherits from one of the // above two classes. template
::value_type, class D = typename std::iterator_traits
::difference_type, class Cat = typename std::iterator_traits
::iterator_category> #else class T, class D, class Cat> #endif class edge_list : public mpl::if_< typename is_random
::type, edge_list_impl_ra< edge_list
, EdgeIter,T,D>, edge_list_impl< edge_list
, EdgeIter,T,D> >::type { public: typedef directed_tag directed_category; typedef allow_parallel_edge_tag edge_parallel_category; typedef edge_list_graph_tag traversal_category; typedef std::size_t edges_size_type; typedef std::size_t vertices_size_type; typedef std::size_t degree_size_type; edge_list(EdgeIter first, EdgeIter last) : _first(first), _last(last) { m_num_edges = std::distance(first, last); } edge_list(EdgeIter first, EdgeIter last, edges_size_type E) : _first(first), _last(last), m_num_edges(E) { } EdgeIter _first, _last; edges_size_type m_num_edges; }; template
std::size_t num_edges(const edge_list
& el) { return el.m_num_edges; } #ifndef BOOST_NO_STD_ITERATOR_TRAITS template
inline edge_list
make_edge_list(EdgeIter first, EdgeIter last) { return edge_list
(first, last); } #endif } /* namespace boost */ #endif /* BOOST_GRAPH_EDGE_LIST_HPP */
edge_list.hpp
Page URL
File URL
Prev
26/95
Next
Download
( 9 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.