27 #ifndef SRC_EDIT_COSTS_CHEM_1_IPP_ 28 #define SRC_EDIT_COSTS_CHEM_1_IPP_ 33 CHEM1<GXLLabel, GXLLabel>::
38 CHEM1(
double node_ins_del_cost,
double node_rel_cost,
double edge_ins_del_cost,
double edge_rel_cost) :
39 node_ins_del_cost_{node_ins_del_cost},
40 node_rel_cost_{node_rel_cost},
41 edge_ins_del_cost_{edge_ins_del_cost},
42 edge_rel_cost_{edge_rel_cost} {}
48 return node_ins_del_cost_;
55 return node_ins_del_cost_;
62 if (node_label_1.at(
"chem") != node_label_2.at(
"chem")) {
63 return node_rel_cost_;
72 return edge_ins_del_cost_;
79 return edge_ins_del_cost_;
86 if (edge_label_1.at(
"valence") != edge_label_2.at(
"valence")) {
87 return edge_rel_cost_;
CHEM1(double node_ins_del_cost=4, double node_rel_cost=2, double edge_ins_del_cost=1, double edge_rel_cost=1)
Constructor.
virtual double edge_ins_cost_fun(const UserEdgeLabel &edge_label) const final
Edge insertion 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.
virtual double edge_del_cost_fun(const UserEdgeLabel &edge_label) const final
Edge deletion cost function.
virtual double node_del_cost_fun(const UserNodeLabel &node_label) const final
Node 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.
std::map< std::string, std::string > GXLLabel
Type of node and edge labels of graphs given in the .gxl file format.
Global namespace for GEDLIB.