...one of the most highly
regarded and expertly designed C++ library projects in the
world.

— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards

The local subgraph adaptor takes an existing Distributed Graph and filters out all of the nonlocal edges and vertices, presenting only the local portion of the distributed graph to the user. The behavior is equivalent to (and implemented with) a filtered graph, and is a noncopying view into the graph itself. Changes made through the filtered graph will be reflected in the original graph and vice-versa.

template<typename DistributedGraph> class local_subgraph; template<typename DistributedGraph> local_subgraph<DistributedGraph> make_local_subgraph(DistributedGraph& g);

<boost/graph/distributed/local_subgraph.hpp>

The local subgraph adaptor adapts and forwards all operations of distributed graphs, the signatures of which will be omitted. Only operations unique to the local subgraph adaptor are presented.

local_subgraph(DistributedGraph& g);

Constructs a local subgraph presenting the local portion of the
distributed graph `g`.

DistributedGraph& base() { return g; } const DistributedGraph& base() const { return g; }

Returns the underlying distributed graph.

template<typename DistributedGraph> local_subgraph<DistributedGraph> make_local_subgraph(DistributedGraph& g);

Constructs a local subgraph presenting the local portion of the
distributed graph `g`.