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 David Abrahams 2000. // 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 REVERSE_GRAPH_DWA092300_H_ # define REVERSE_GRAPH_DWA092300_H_ #include
#include
#include
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // Stay out of the way of the concept checking class # define BidirectionalGraph BidirectionalGraph_ #endif namespace boost { struct reverse_graph_tag { }; namespace detail { template
struct choose_rev_edge_iter { }; template <> struct choose_rev_edge_iter
{ template
struct bind_ { typedef typename graph_traits
::edge_iterator type; }; }; template <> struct choose_rev_edge_iter
{ template
struct bind_ { typedef void type; }; }; } // namespace detail template
class reverse_graph { typedef reverse_graph
Self; typedef graph_traits
Traits; public: typedef BidirectionalGraph base_type; // Constructor reverse_graph(GraphRef g) : m_g(g) {} // Graph requirements typedef typename Traits::vertex_descriptor vertex_descriptor; typedef typename Traits::edge_descriptor edge_descriptor; typedef typename Traits::directed_category directed_category; typedef typename Traits::edge_parallel_category edge_parallel_category; typedef typename Traits::traversal_category traversal_category; // IncidenceGraph requirements typedef typename Traits::in_edge_iterator out_edge_iterator; typedef typename Traits::degree_size_type degree_size_type; // BidirectionalGraph requirements typedef typename Traits::out_edge_iterator in_edge_iterator; // AdjacencyGraph requirements typedef typename adjacency_iterator_generator
::type adjacency_iterator; // VertexListGraph requirements typedef typename Traits::vertex_iterator vertex_iterator; // EdgeListGraph requirements enum { is_edge_list = is_convertible
::value }; typedef detail::choose_rev_edge_iter
ChooseEdgeIter; typedef typename ChooseEdgeIter:: template bind_
::type edge_iterator; typedef typename Traits::vertices_size_type vertices_size_type; typedef typename Traits::edges_size_type edges_size_type; // More typedefs used by detail::edge_property_map, vertex_property_map typedef typename BidirectionalGraph::edge_property_type edge_property_type; typedef typename BidirectionalGraph::vertex_property_type vertex_property_type; typedef reverse_graph_tag graph_tag; #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES // Bundled properties support template
typename graph::detail::bundled_result
::type& operator[](Descriptor x) { return m_g[x]; } template
typename graph::detail::bundled_result
::type const& operator[](Descriptor x) const { return m_g[x]; } #endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES static vertex_descriptor null_vertex() { return Traits::null_vertex(); } // would be private, but template friends aren't portable enough. // private: GraphRef m_g; }; #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES template
struct vertex_bundle_type
> : vertex_bundle_type
{ }; template
struct edge_bundle_type
> : edge_bundle_type
{ }; #endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES template
inline reverse_graph
make_reverse_graph(const BidirectionalGraph& g) { return reverse_graph
(g); } template
inline reverse_graph
make_reverse_graph(BidirectionalGraph& g) { return reverse_graph
(g); } template
std::pair
::vertex_iterator, typename reverse_graph
::vertex_iterator> vertices(const reverse_graph
& g) { return vertices(g.m_g); } template
std::pair
::edge_iterator, typename reverse_graph
::edge_iterator> edges(const reverse_graph
& g) { return edges(g.m_g); } template
inline std::pair
out_edges(const typename BidirectionalGraph::vertex_descriptor u, const reverse_graph
& g) { return in_edges(u, g.m_g); } template
inline typename BidirectionalGraph::vertices_size_type num_vertices(const reverse_graph
& g) { return num_vertices(g.m_g); } template
inline typename reverse_graph
::edges_size_type num_edges(const reverse_graph
& g) { return num_edges(g.m_g); } template
inline typename BidirectionalGraph::degree_size_type out_degree(const typename BidirectionalGraph::vertex_descriptor u, const reverse_graph
& g) { return in_degree(u, g.m_g); } template
inline std::pair
edge(const typename BidirectionalGraph::vertex_descriptor u, const typename BidirectionalGraph::vertex_descriptor v, const reverse_graph
& g) { return edge(v, u, g.m_g); } template
inline std::pair
in_edges(const typename BidirectionalGraph::vertex_descriptor u, const reverse_graph
& g) { return out_edges(u, g.m_g); } template
inline std::pair
::adjacency_iterator, typename reverse_graph
::adjacency_iterator> adjacent_vertices(const typename BidirectionalGraph::vertex_descriptor u, const reverse_graph
& g) { typedef reverse_graph
Graph; typename Graph::out_edge_iterator first, last; tie(first, last) = out_edges(u, g); typedef typename Graph::adjacency_iterator adjacency_iterator; return std::make_pair(adjacency_iterator(first, const_cast
(&g)), adjacency_iterator(last, const_cast
(&g))); } template
inline typename BidirectionalGraph::degree_size_type in_degree(const typename BidirectionalGraph::vertex_descriptor u, const reverse_graph
& g) { return out_degree(u, g.m_g); } template
inline typename graph_traits
::vertex_descriptor source(const Edge& e, const reverse_graph
& g) { return target(e, g.m_g); } template
inline typename graph_traits
::vertex_descriptor target(const Edge& e, const reverse_graph
& g) { return source(e, g.m_g); } namespace detail { struct reverse_graph_vertex_property_selector { template
struct bind_ { typedef typename ReverseGraph::base_type Graph; typedef property_map
PMap; typedef typename PMap::type type; typedef typename PMap::const_type const_type; }; }; struct reverse_graph_edge_property_selector { template
struct bind_ { typedef typename ReverseGraph::base_type Graph; typedef property_map
PMap; typedef typename PMap::type type; typedef typename PMap::const_type const_type; }; }; } // namespace detail template <> struct vertex_property_selector
{ typedef detail::reverse_graph_vertex_property_selector type; }; template <> struct edge_property_selector
{ typedef detail::reverse_graph_edge_property_selector type; }; template
typename property_map
::type get(Property p, reverse_graph
& g) { return get(p, g.m_g); } template
typename property_map
::const_type get(Property p, const reverse_graph
& g) { const BidirGraph& gref = g.m_g; // in case GRef is non-const return get(p, gref); } template
typename property_traits< typename property_map
::const_type >::value_type get(Property p, const reverse_graph
& g, const Key& k) { return get(p, g.m_g, k); } template
void put(Property p, const reverse_graph
& g, const Key& k, const Value& val) { put(p, g.m_g, k, val); } template
inline void set_property(const reverse_graph
& g, Tag tag, const Value& value) { set_property(g.m_g, tag, value); } template
inline typename graph_property
::type get_property(const reverse_graph
& g, Tag tag) { return get_property(g.m_g, tag); } } // namespace boost #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // Stay out of the way of the concept checking class # undef BidirectionalGraph #endif #endif
reverse_graph.hpp
Page URL
File URL
Prev
77/95
Next
Download
( 10 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.