#include <graph_wrapper.h>
Inheritance diagram for SubGraphWrapper:
typedef SmartGraph Graph; Graph g; typedef Graph::Node Node; typedef Graph::Edge Edge; Node u=g.addNode(); //node of id 0 Node v=g.addNode(); //node of id 1 Node e=g.addEdge(u, v); //edge of id 0 Node f=g.addEdge(v, u); //edge of id 1 Graph::NodeMap<bool> nm(g, true); nm.set(u, false); Graph::EdgeMap<bool> em(g, true); em.set(e, false); typedef SubGraphWrapper<Graph, Graph::NodeMap<bool>, Graph::EdgeMap<bool> > SubGW; SubGW gw(g, nm, em); for (SubGW::NodeIt n(gw); n!=INVALID; ++n) std::cout << g.id(n) << std::endl; std::cout << ":-)" << std::endl; for (SubGW::EdgeIt e(gw); e!=INVALID; ++e) std::cout << g.id(e) << std::endl;
1 :-) 1
n
is of type SubGW::NodeIt
, but it can be converted to Graph::Node
that is why g.id(n)
can be applied.
Definition at line 370 of file graph_wrapper.h.
Public Member Functions | |
void | hide (const Node &n) const |
void | hide (const Edge &e) const |
void | unHide (const Node &n) const |
void | unHide (const Edge &e) const |
bool | hidden (const Node &n) const |
Returns true if n is hidden. | |
bool | hidden (const Edge &e) const |
Returns true if n is hidden. | |
int | nodeNum () const |
int | edgeNum () const |
|
This function hides |
|
This function hides |
|
The value of |
|
The value of |
|
Reimplemented from GraphWrapper. Definition at line 541 of file graph_wrapper.h. |
|
Reimplemented from GraphWrapper. Definition at line 549 of file graph_wrapper.h. |