The following example produces the following (unexpected results):
name: graph
name: subgraph 1
name sg2: subgraph 2
name sg: subgraph 2
Do subgraphs share the same property_map?
Gordon.
// SubGraphPropertyTest.cpp : Defines the entry point for the console
application.
//
#include "stdafx.h"
#include <string>
#include <iostream>
#include
#include
#include
int
main()
{
using namespace boost;
using std::string;
typedef adjacency_list,
property > graph_t;
graph_t g;
get_property(g, graph_name) = "graph";
std::cout << "name: " << get_property(g, graph_name) << std::endl;
typedef subgraph subgraph_t;
subgraph_t sg;
get_property(sg, graph_name) = "subgraph 1";
std::cout << "name: " << get_property(sg, graph_name) << std::endl;
subgraph_t sg2 = sg.create_subgraph();
get_property(sg2, graph_name) = "subgraph 2";
std::cout << "name sg2: " << get_property(sg2, graph_name) << std::endl;
std::cout << "name sg: " << get_property(sg, graph_name) << std::endl;
return exit_success;
}