27 #ifndef SRC_EDIT_COSTS_FINGERPRINT_IPP_ 28 #define SRC_EDIT_COSTS_FINGERPRINT_IPP_ 34 Fingerprint<GXLLabel, GXLLabel>::
39 Fingerprint(
double node_ins_del_cost,
double edge_ins_del_cost,
double alpha) :
40 node_ins_del_cost_{node_ins_del_cost},
41 edge_ins_del_cost_{edge_ins_del_cost},
48 return alpha_ * node_ins_del_cost_;
55 return alpha_ * node_ins_del_cost_;
69 return (1 - alpha_) * edge_ins_del_cost_;
76 return (1 - alpha_) * edge_ins_del_cost_;
83 double orient_diff{std::fabs(std::stod(edge_label_1.at(
"orient")) - std::stod(edge_label_2.at(
"orient")))};
84 return (1 - alpha_) * std::min(pi_() - orient_diff, orient_diff);
Fingerprint(double node_ins_del_cost=0.7, double edge_ins_del_cost=0.5, double alpha=0.75)
Constructor.
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_ins_cost_fun(const UserEdgeLabel &edge_label) const final
Edge insertion 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.
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.
Global namespace for GEDLIB.
virtual double node_ins_cost_fun(const UserNodeLabel &node_label) const final
Node insertions cost function.