27 #ifndef SRC_EDIT_COSTS_CHEM_2_IPP_ 28 #define SRC_EDIT_COSTS_CHEM_2_IPP_ 33 CHEM2<GXLLabel, GXLLabel>::
38 CHEM2(
double node_ins_del_cost,
double edge_ins_del_cost,
double alpha) :
39 node_ins_del_cost_{node_ins_del_cost},
40 edge_ins_del_cost_{edge_ins_del_cost},
47 return alpha_ * node_ins_del_cost_;
54 return alpha_ * node_ins_del_cost_;
61 if (node_label_1.at(
"chem") != node_label_2.at(
"chem")) {
62 return alpha_ * 2 * node_ins_del_cost_;
71 return (1 - alpha_) * edge_ins_del_cost_;
78 return (1 - alpha_) * edge_ins_del_cost_;
85 if (edge_label_1.at(
"valence") != edge_label_2.at(
"valence")) {
86 return (1 - alpha_) * edge_ins_del_cost_;
virtual double edge_del_cost_fun(const UserEdgeLabel &edge_label) const final
Edge deletion cost function.
virtual double node_rel_cost_fun(const UserNodeLabel &node_label_1, const UserNodeLabel &node_label_2) const final
Node relabeling cost function.
virtual double node_ins_cost_fun(const UserNodeLabel &node_label) const final
Node insertions cost function.
virtual double edge_rel_cost_fun(const UserEdgeLabel &edge_label_1, const UserEdgeLabel &edge_label_2) const final
Edge relabeling cost function.
std::map< std::string, std::string > GXLLabel
Type of node and edge labels of graphs given in the .gxl file format.
virtual double node_del_cost_fun(const UserNodeLabel &node_label) const final
Node deletion cost function.
Global namespace for GEDLIB.
virtual double edge_ins_cost_fun(const UserEdgeLabel &edge_label) const final
Edge insertion cost function.
CHEM2(double node_ins_del_cost=11, double edge_ins_del_cost=1.1, double alpha=0.25)
Constructor.