boostorg / boostorg/graph

[API] Add convenience headers for property maps

Open
#471 0 comments 0 reactions 0 assignees View on GitHub
beginner friendly
Dominant language
C++
Stars
392
Forks
239
Avg merge
1d 11m
Merged PRs (30d)
20

Description

## Problem

As I am rewriting the documentation for the property map system, I find the current way to navigate headers rather complex:

| Header | Contents |
|--------|----------|
| `` | Internal property tags (`vertex_index`, `edge_weight`, ...), `get(tag, g)` |
| `` | `iterator_property_map`, `static_property_map`, `associative_property_map`, `dummy_property_map` |
| `` | `vector_property_map` |
| `` | `make_function_property_map` |
| `` | `make_transform_value_property_map` |
| `` | `constant_property_map`, `make_constant_property` |
| `` | `null_property_map`, `make_null_property` |

Property map types are split across two libraries: `boost/graph/` (internal properties, constant/null maps) and `boost/property_map/` (the generic adaptors). This split is an implementation detail users should not have to think about.

## Solution

I am thinking about a convenience header that pulls those in an uniformize the namespaces. That would reduce the friction for newcomers, and we can leave this previous table in the documentation if more experimented users want to trim dependencies ?

```cpp
#include // 374 lines pulls the PM library and its BGL extensions
// boost/property_map/property_map.hpp (iterator_, static_, assoc_, dummy_)
// boost/graph/property_maps/constant_property_map.hpp
// boost/graph/property_maps/null_property_map.hpp
#include // 96 lines
#include // 66 lines
#include // 67 lines
```

If I understood correctly, all of the underlying types live in the `boost::` namespace so we are good namespace-wise.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.