Cppnow2016
C++Now 2016 talk - Pulling Visitors: Boost.Graph + Boost.Coroutine
Install / Use
/learn @daniel-j-h/Cppnow2016README
Pulling Visitors: Boost.Graph + Boost.Coroutine
Overview
I recommend going through the examples in order.
| Example | Introduces |
| -------------- | ---------------------------------------------------------------------------------------------------- |
| 01.cc | Dynamic graph, adjacency_list |
| 02.cc | Bundled Properties, working with vertex / edge ranges |
| 03.cc | Static graph, compressed_sparse_row_graph, temporary graph-external properties |
| 04.cc | Breadth-first search, customization through visitor |
| 05.cc | Breadth-first search, inverting control flow with coroutines, stepwise iteration, stdlib integration |
| 06.cc | Bidirectional dijkstra, customization through visitor, problem with stepping visitors |
| 07.cc | Bidirectional dijkstra, inverted control flow with coroutines, stepwise iteration |
| 08.cc | GeoJSON from graph for visualization |
Building the Examples
mkdir build && cd build
export CC='clang' CXX='clang++' CXXFLAGS='-Wall -Wextra -pedantic'
cmake .. -DCMAKE_BUILD_TYPE=Release
With Nix:
nix-shell --pure --run 'env CXXFLAGS="-Wall -Wextra -pedantic" mkdir build && cd build && cmake ..'
nix-shell --pure --run 'cmake --build build'
Note: apply use-boost-coroutine2.patch if you want to use the newer Boost.Coroutine2 instead of the Boost.Coroutine library.
This requires your Boost >=1.59 distribution to be build with CXXFLAGS=-std=c++14, which is probably not the case by default or using Boost >=1.61 where Boost.Coroutine2 was relaxed to C++11.
Resources
- Boost.Graph
- Boost.Graph Concepts
- Boost.Coroutine
- tippecanoe for zoom-based GeoJSON simplification
- Mapbox Studio or geojson.io for visualizing GeoJSON
- Richel Bilderbeek's recent take on writing a C++11 Boost.Graph tutorial
- libosmium and Boost.Geometry for your OpenStreetMap based project
- How it all started
License
Copyright © 2016 Daniel J. Hofmann
Distributed under the MIT License (MIT).
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
