27 #ifndef SRC_ENV_NODE_MAP_HPP_ 28 #define SRC_ENV_NODE_MAP_HPP_ 47 typedef std::pair<GEDGraph::NodeID, GEDGraph::NodeID> Assignment;
54 NodeMap(std::size_t num_nodes_g, std::size_t num_nodes_h);
119 void as_relation(std::vector<Assignment> & relation)
const;
169 std::vector<GEDGraph::NodeID> forward_map_;
171 std::vector<GEDGraph::NodeID> backward_map_;
173 double induced_cost_;
192 std::ostream &
operator<<(std::ostream & os,
const NodeMap::Assignment & assignment);
void erase_image(GEDGraph::NodeID node)
Erases image of a node.
void as_relation(std::vector< Assignment > &relation) const
Constructs the representation as relation.
bool empty() const
Checks if the node map is empty.
std::size_t num_source_nodes() const
Returns number of source nodes contained in the node map.
ged::GEDGraph class declaration.
GEDGraph::NodeID pre_image(GEDGraph::NodeID node) const
Returns pre-image of a node.
ged::NodeMap class definition.
double induced_cost() const
Returns the induced cost.
std::ostream & operator<<(std::ostream &os, const NodeMap &node_map)
Streams a node map.
bool complete(const GEDGraph &g, const GEDGraph &h) const
Checks if the node map is complete.
NodeMap(std::size_t num_nodes_g, std::size_t num_nodes_h)
Default constructor.
Type declarations used by various classes.
The normalized input graphs used by GEDLIB. All labels are integers.
void add_assignment(GEDGraph::NodeID i, GEDGraph::NodeID k)
Add node substitution, insertion, or deletion to the node map.
void set_induced_cost(double induced_cost)
Sets the induced cost of the node map.
std::size_t num_target_nodes() const
Returns number of target nodes contained in the node map.
Global namespace for GEDLIB.
void clear()
Clears the node map.
void erase_pre_image(GEDGraph::NodeID node)
Erases pre-image of a node.
bool operator==(const NodeMap &node_map) const
Checks if two node maps are the same.
GEDGraph::NodeID image(GEDGraph::NodeID node) const
Returns image of a node.
bool operator<(const NodeMap &node_map) const
Compares this node map to another node map.
void operator=(const NodeMap &node_map)
Assignment operator.
std::size_t NodeID
Internally used vertex ID type.