Difference between revisions of "Boost"
From ProgrammingExamples
Daviddoria (Talk | contribs) (→Boost Graph Library (BGL)) |
Daviddoria (Talk | contribs) m (→Boost Graph Library (BGL)) |
||
Line 21: | Line 21: | ||
== Boost Graph Library (BGL) == | == Boost Graph Library (BGL) == | ||
+ | * [[CPP/Boost/CreateGraph|Create a graph]] - This is the most fundamental process of using BGL - creating a graph. This example explains 3 methods of creating a graph, using adjacency_list directly, and also using the directed_graph and undirected_graph subclasses. | ||
+ | |||
* [[CPP/Boost/BGL/Directed/Weighted|Access an edge]] | * [[CPP/Boost/BGL/Directed/Weighted|Access an edge]] | ||
* [[CPP/Boost/BGL/DijkstraDirected|Find the shortest path (Dijkstra) from a specified vertex to all other vertices in a directed graph]] | * [[CPP/Boost/BGL/DijkstraDirected|Find the shortest path (Dijkstra) from a specified vertex to all other vertices in a directed graph]] | ||
* [[CPP/Boost/BGL/DijkstraUndirected|Find the shortest path (Dijkstra) from a specified vertex to all other vertices in an undirected graph]] | * [[CPP/Boost/BGL/DijkstraUndirected|Find the shortest path (Dijkstra) from a specified vertex to all other vertices in an undirected graph]] | ||
* [[CPP/Boost/BGL/DijkstraComputePath|Find the shortest path (Dijkstra) from one specified vertex to another specified vertex in a graph]] | * [[CPP/Boost/BGL/DijkstraComputePath|Find the shortest path (Dijkstra) from one specified vertex to another specified vertex in a graph]] | ||
− | + | ||
* [[CPP/Boost/RemoveVertex|Remove a vertex from a graph]] | * [[CPP/Boost/RemoveVertex|Remove a vertex from a graph]] | ||
* [[CPP/Boost/RemoveEdge|Remove an edge from a graph]] | * [[CPP/Boost/RemoveEdge|Remove an edge from a graph]] |
Revision as of 13:55, 12 June 2011
The following examples are frequent use cases of parts of the Boost (http://www.boost.org/) library. Each example includes a CMakeLists.txt file so it can be easily compiled.
- Bidirectional (both ways) map
- Glorified function pointers (function.hpp and bind.hpp)
- Create a histogram (accumulator)
- Matrix
- Multi dimensional array
- Simple command line argument parsing (ProgramOptions)
- Multiple command line argument parsing (ProgramOptions)
- ProgressBar
- Threads
- Threads with member functions
- ThreadCommunication
- Timer
- Signal/slot pattern
- Signal/slot pattern with member functions
- Signal/slot pattern with member classes
- Signal/slot pattern with member classes which have parameters
- Signals2: Signal/slot pattern with type safety
- Signals2: Signal/slot pattern with parameters type safety
Boost Graph Library (BGL)
- Create a graph - This is the most fundamental process of using BGL - creating a graph. This example explains 3 methods of creating a graph, using adjacency_list directly, and also using the directed_graph and undirected_graph subclasses.
- Access an edge
- Find the shortest path (Dijkstra) from a specified vertex to all other vertices in a directed graph
- Find the shortest path (Dijkstra) from a specified vertex to all other vertices in an undirected graph
- Find the shortest path (Dijkstra) from one specified vertex to another specified vertex in a graph
- Remove a vertex from a graph
- Remove an edge from a graph
- Read a graph from a file
- Write a graph to a file
- Add properties to edges
- Add properties to vertices
- Bundled properties
- Get a list of neighboring (adjacent) vertices
- Directed graphs only give access to out edges
- Bidirectional graphs give access to both in and out edges
- Number of incoming, outgoing, and total edges
- Breadth first search (BFS with a custom visitor)
- Breadth first search with make_bfs_visitor
- Depth first search (DFS)