PropertyGraph
A PropertyGraph is a graph that has some property associated with each of the vertices or edges in the graph. As a given graph may have several properties associated with each vertex or edge, a tag is used to identify which property is being accessed. The graph provides a function which returns a property map object.
Notation
G |
A type that is a model of PropertyGraph. |
|---|---|
|
An object of type |
|
Either the vertex or edge descriptor type for |
|
An object of type |
|
The type
|
|
An object of type
|
|
A type that models the PropertyTag concept. |
|
An object of type |
|
An object of type |
Associated types
The type of the property map for the property specified by
|
The type of the const property map for the property specified by
|
Valid Expressions
|
Returns the property map for the property specified by the
|
|
Returns the property value (specified by the
|
|
Set the property (specified by the |
Models
-
adjacency_listwithVertexProperty=property<vertex_distance_t,int,property<vertex_in_degree_t,int> >andPropertyTag=vertex_distance_t. -
adjacency_listwithVertexPropertyTag=property<vertex_distance_t,int,property<vertex_in_degree_t,int> >andPropertyTag=vertex_in_degree_t.
Concept Checking Class
template <class Graph, class X, class PropertyTag>
struct PropertyGraphConcept
{
typedef typename property_map<G, PropertyTag>::type Map;
typedef typename property_map<G, PropertyTag>::const_type const_Map;
void constraints() {
BOOST_CONCEPT_ASSERT(( GraphConcept<G> ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<Map, X> ));
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<const_Map, X> ));
Map pmap = get(PropertyTag(), g);
pval = get(PropertyTag(), g, x);
put(PropertyTag(), g, x, pval);
ignore_unused_variable_warning(pmap);
}
void const_constraints(const G& g) {
const_Map pmap = get(PropertyTag(), g);
pval = get(PropertyTag(), g, x);
ignore_unused_variable_warning(pmap);
}
G g;
X x;
typename property_traits<Map>::value_type pval;
};