DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
True Drop Box
FTP/SFTP Hosting
Group Account
Team Anywhere
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
|
Cloud-to-Cloud Backup
|
DVR/Camera Backup
FTP, Email & Web Service
FTP/SFTP Hosting
|
Email Hosting
|
Web Hosting
|
Webcam Hosting
Cloud Surveillance & Remote Desktop
Team Anywhere
|
Connect to Remote PC
|
Cloud Surveillance
|
Virtual CCTV NVR
Quick Links
Security and Privacy
Customer Support
Service Manual
Use Cases
Group Account
Online Help
Support Forum
Contact Us
About DriveHQ
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
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
Cloud Surveillance & Remote Desktop
Team Anywhere (Remote Desktop Service)
CameraFTP Cloud Surveillance
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Team Anywhere for Windows (Beta)
DriveHQ Mobile Apps
CameraFTP Software & Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
CameraFTP Cloud Recording Service Plans
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_TOPOLOGICAL_SORT_HPP #define BOOST_GRAPH_TOPOLOGICAL_SORT_HPP #include <boost/config.hpp> #include <boost/property_map.hpp> #include <boost/graph/depth_first_search.hpp> #include <boost/graph/visitors.hpp> #include <boost/graph/exception.hpp> namespace boost { // Topological sort visitor // // This visitor merely writes the linear ordering into an // OutputIterator. The OutputIterator could be something like an // ostream_iterator, or it could be a back/front_insert_iterator. // Note that if it is a back_insert_iterator, the recorded order is // the reverse topological order. On the other hand, if it is a // front_insert_iterator, the recorded order is the topological // order. // template <typename OutputIterator> struct topo_sort_visitor : public dfs_visitor<> { topo_sort_visitor(OutputIterator _iter) : m_iter(_iter) { } template <typename Edge, typename Graph> void back_edge(const Edge& u, Graph&) { throw not_a_dag(); } template <typename Vertex, typename Graph> void finish_vertex(const Vertex& u, Graph&) { *m_iter++ = u; } OutputIterator m_iter; }; // Topological Sort // // The topological sort algorithm creates a linear ordering // of the vertices such that if edge (u,v) appears in the graph, // then u comes before v in the ordering. The graph must // be a directed acyclic graph (DAG). The implementation // consists mainly of a call to depth-first search. // template <typename VertexListGraph, typename OutputIterator, typename P, typename T, typename R> void topological_sort(VertexListGraph& g, OutputIterator result, const bgl_named_params<P, T, R>& params) { typedef topo_sort_visitor<OutputIterator> TopoVisitor; depth_first_search(g, params.visitor(TopoVisitor(result))); } template <typename VertexListGraph, typename OutputIterator> void topological_sort(VertexListGraph& g, OutputIterator result) { topological_sort(g, result, bgl_named_params<int, buffer_param_t>(0)); // bogus } } // namespace boost #endif /*BOOST_GRAPH_TOPOLOGICAL_SORT_H*/
topological_sort.hpp
Page URL
File URL
Prev
86/95
Next
Download
( 2 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.