27 #ifndef SRC_ENV_GED_GRAPH_HPP_ 28 #define SRC_ENV_GED_GRAPH_HPP_ 39 namespace al_graph_prop {
49 namespace am_graph_prop {
59 typedef boost::adjacency_list<
67 typedef boost::adjacency_matrix<
73 namespace al_graph_prop {
87 namespace am_graph_prop {
92 GedGraphAL::edge_descriptor cref;
110 typedef detail::GedGraphAL::edge_descriptor
EdgeID;
112 typedef std::vector<GEDGraph>::size_type
GraphID;
158 static NodeID dummy_node();
164 static NodeID undefined_node();
170 static EdgeID dummy_edge();
185 EdgeID add_edge(NodeID tail, NodeID head);
192 void set_label(NodeID node,
LabelID label);
199 void set_label(EdgeID edge,
LabelID label);
206 LabelID get_node_label(NodeID node)
const;
213 LabelID get_edge_label(EdgeID edge)
const;
221 LabelID get_edge_label(NodeID node_1, NodeID node_2)
const;
227 void setup_adjacency_matrix();
236 NodeID tail(EdgeID edge)
const;
245 NodeID head(EdgeID edge)
const;
255 EdgeID get_edge(NodeID tail, NodeID head)
const;
265 EdgeID safe_get_edge(NodeID tail, NodeID head)
const;
275 bool is_edge(NodeID tail, NodeID head)
const;
284 bool safe_is_edge(NodeID tail, NodeID head)
const;
291 std::size_t degree(NodeID node)
const;
297 std::size_t num_nodes()
const;
303 std::size_t num_edges()
const;
309 bool initialized()
const;
319 std::size_t maxdeg()
const;
325 std::pair<node_iterator, node_iterator> nodes()
const;
331 std::pair<edge_iterator, edge_iterator> edges()
const;
338 std::pair<incident_edge_iterator, incident_edge_iterator> incident_edges(NodeID node)
const;
344 const detail::GedGraphAL & get_adjacency_list()
const;
348 detail::GedGraphAL alist_;
350 detail::GedGraphAM amatrix_;
std::map< NodeID, NodeID > NodeNodeMap
Map that assigns node IDs to node IDs.
std::map< NodeID, std::size_t > NodeSizeTMap
Map that assigns node IDs to integers.
ged::Matrix class declaration.
std::map< std::size_t, NodeID > SizeTNodeMap
Map that assigns node IDs to integers.
std::vector< GEDGraph >::size_type GraphID
Type of internally used graph IDs.
GEDGraph class definition.
std::ostream & operator<<(std::ostream &os, const std::map< Key, Value > &map)
Streams std::map.
detail::GedGraphAL::edge_iterator edge_iterator
Iterator type for iterating over all edges of the graph.
detail::GedGraphAL::out_edge_iterator incident_edge_iterator
Iterator type for iterating over all the incident edges of a node in the graph.
std::size_t LabelID
Internally used type of node and edge labels.
Type declarations used by various classes.
constexpr LabelID invalid_label()
Returns an invalid label.
The normalized input graphs used by GEDLIB. All labels are integers.
detail::GedGraphAL::vertex_iterator node_iterator
Iterator type for iterating over all nodes in the graph.
detail::GedGraphAL::edge_descriptor EdgeID
Internally used edge ID type.
Global namespace for GEDLIB.
std::size_t NodeID
Internally used vertex ID type.