74 graph (
const graph& G,
const list<node>& nodes);
87 list<node>::const_iterator
it,
88 list<node>::const_iterator
end);
100 void make_directed();
105 void make_undirected();
114 bool is_directed()
const;
121 bool is_undirected()
const;
143 bool is_connected()
const;
151 bool is_acyclic()
const;
158 int number_of_nodes()
const;
165 int number_of_edges()
const;
182 virtual node new_node();
200 virtual edge new_edge(
const list<node> &sources,
const list<node> &targets);
214 void del_node(
node n);
220 void del_all_nodes();
231 void del_edge(
edge e);
237 void del_all_edges();
289 list<node> all_nodes()
const;
295 list<edge> all_edges()
const;
300 node choose_node ()
const;
312 void hide_edge (
edge e);
322 void restore_edge (
edge e);
335 list<edge> hide_node (
node n);
347 void restore_node (
node n);
360 void induced_subgraph (list<node>& subgraph_nodes);
372 void restore_graph ();
381 list<edge> insert_reverse_edges();
402 {
return load (filename.c_str(), preserve_ids); }
439 void save (ostream*
file = &cout)
const;
716 virtual void top_level_key_handler (
GML_pair* list);
728 virtual void load_node_info_handler (
node n,
GML_pair* list );
740 virtual void load_edge_info_handler (
edge e,
GML_pair* list);
750 virtual void load_graph_info_handler (
GML_pair* list);
777 void copy (
const graph& G,
778 list<node>::const_iterator it,
779 list<node>::const_iterator end);
785 int number_of_ids(
node)
const;
790 int number_of_ids(
edge)
const;
799 void del_list(list<node> &);
800 void del_list(list<edge> &);
811 #define forall_nodes(v,g) GTL_FORALL(v,g,graph::node_iterator,nodes_)
812 #define forall_edges(v,g) GTL_FORALL(v,g,graph::edge_iterator,edges_)
814 #endif // GTL_GRAPH_H