MutableGraph: This can be changed via the addition or removal of edges and vertices.
template <class G> struct MutableGraphConcept { typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor; void constraints() { v = add_vertex(g); clear_vertex(v, g); remove_vertex(v, g); e_b = add_edge(u, v, g); remove_edge(u, v, g); remove_edge(e, g); } G g; edge_descriptor e; std::pair<edge_descriptor, bool> e_b; typename boost::graph_traits<G>::vertex_descriptor u, v; typename boost::graph_traits<G>::out_edge_iterator iter; }; template <class edge_descriptor> struct dummy_edge_predicate { bool operator()(const edge_descriptor& e) const { return false; } }; template <class G> struct MutableIncidenceGraphConcept { void constraints() { function_requires< MutableGraph<G> >(); remove_edge(iter, g); remove_out_edge_if(u, p, g); } G g; typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor; dummy_edge_predicate<edge_descriptor> p; typename boost::graph_traits<G>::vertex_descriptor u; typename boost::graph_traits<G>::out_edge_iterator iter; }; template <class G> struct MutableBidirectionalGraphConcept { void constraints() { function_requires< MutableIncidenceGraph<G> >(); remove_in_edge_if(u, p, g); } G g; typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor; dummy_edge_predicate<edge_descriptor> p; typename boost::graph_traits<G>::vertex_descriptor u; }; template <class G> struct MutableEdgeListGraphConcept { void constraints() { function_requires< MutableGraph<G> >(); remove_edge_if(p, g); } G g; typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor; dummy_edge_predicate<edge_descriptor> p; };
None
For additional information or queries on this page send feedback.
© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |
Legal Disclaimer Please note, that by using some of the links in this document you will leave the Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. website and the site you enter is not operated by Nokia. If you choose to access such sites, you should take precautions for security or content. By using the site, you shall review and agree to the site's rules of use before using the site. You agree and acknowledge that Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. has no control over the service and will not assume any liability or responsibility for the availability of the site, nor for any aspects of the service.