GEDLIB  1.0
Public Member Functions | List of all members
ged::Letter< UserNodeLabel, UserEdgeLabel > Class Template Reference

Edit costs for graphs contained in Letter datasets. More...

#include <letter.hpp>

Inheritance diagram for ged::Letter< UserNodeLabel, UserEdgeLabel >:
Inheritance graph
[legend]

Public Member Functions

 Letter (double node_ins_del_cost=0.9, double edge_ins_del_cost=1.7, double alpha=0.75)
 Constructor. More...
 
virtual double node_ins_cost_fun (const UserNodeLabel &node_label) const final
 Node insertions cost function. More...
 
virtual double node_del_cost_fun (const UserNodeLabel &node_label) const final
 Node deletion cost function. More...
 
virtual double node_rel_cost_fun (const UserNodeLabel &node_label_1, const UserNodeLabel &node_label_2) const final
 Node relabeling cost function. More...
 
virtual double edge_ins_cost_fun (const UserEdgeLabel &edge_label) const final
 Edge insertion cost function. More...
 
virtual double edge_del_cost_fun (const UserEdgeLabel &edge_label) const final
 Edge deletion cost function. More...
 
virtual double edge_rel_cost_fun (const UserEdgeLabel &edge_label_1, const UserEdgeLabel &edge_label_2) const final
 Edge relabeling cost function. More...
 
- Public Member Functions inherited from ged::EditCosts< UserNodeLabel, UserEdgeLabel >
virtual ~EditCosts ()=0
 Virtual destructor. More...
 
 EditCosts ()
 Constructor.
 
virtual void vectorize_node_label (const UserNodeLabel &node_label, std::vector< double > &vector_representation) const
 Computes a node label's representation as a real-valued vector. More...
 
virtual void vectorize_edge_label (const UserEdgeLabel &edge_label, std::vector< double > &vector_representation) const
 Computes an edge label's representation as a real-valued vector. More...
 

Detailed Description

template<class UserNodeLabel, class UserEdgeLabel>
class ged::Letter< UserNodeLabel, UserEdgeLabel >

Edit costs for graphs contained in Letter datasets.

The graphs contained in the Letter datasets represent the capital letters A, E, F, H, I, K, L, M, N, T, V, W, X, Y, and Z which have been distorted by three different degrees (low, medium, high). Nodes are attributed with Euclidean coordinates (named "x" and "y"). Edges are have no attributes. The Letter datasets are contained in the IAM graph database repository which can be downloaded from http://www.fki.inf.unibe.ch/databases/iam-graph-database:

Implements the edit costs suggested in:

Definition at line 50 of file letter.hpp.

Constructor & Destructor Documentation

◆ Letter()

template<class UserNodeLabel , class UserEdgeLabel >
ged::Letter< UserNodeLabel, UserEdgeLabel >::Letter ( double  node_ins_del_cost = 0.9,
double  edge_ins_del_cost = 1.7,
double  alpha = 0.75 
)

Constructor.

Parameters
[in]node_ins_del_costCost for deleting or inserting nodes.
[in]edge_ins_del_costCost for deleting or inserting edges.
[in]alphaImportance of node edit operations vs. importance of edge edit operations.
Note
Calling the constructor with the default arguments constructs the edit costs for Letter high suggested in https://doi.org/10.1142/9789814304726_0004. For Letter medium, the suggested arguments are node_ins_del_cost = 0.7, edge_ins_del_cost = 1.9, and alpha = 0.75. For Letter low, the suggested arguments are node_ins_del_cost = 0.3, edge_ins_del_cost = 0.1, and alpha = 0.25.

Member Function Documentation

◆ edge_del_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::Letter< UserNodeLabel, UserEdgeLabel >::edge_del_cost_fun ( const UserEdgeLabel &  edge_label) const
finalvirtual

Edge deletion cost function.

Parameters
[in]edge_labelAn edge label.
Returns
The cost of deleting an edge with label edge_label.
Note
Must be implemented by derived classes of ged::EditCosts.

Reimplemented from ged::EditCosts< UserNodeLabel, UserEdgeLabel >.

◆ edge_ins_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::Letter< UserNodeLabel, UserEdgeLabel >::edge_ins_cost_fun ( const UserEdgeLabel &  edge_label) const
finalvirtual

Edge insertion cost function.

Parameters
[in]edge_labelAn edge label.
Returns
The cost of inserting an edge with label edge_label.
Note
Must be implemented by derived classes of ged::EditCosts.

Reimplemented from ged::EditCosts< UserNodeLabel, UserEdgeLabel >.

◆ edge_rel_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::Letter< UserNodeLabel, UserEdgeLabel >::edge_rel_cost_fun ( const UserEdgeLabel &  edge_label_1,
const UserEdgeLabel &  edge_label_2 
) const
finalvirtual

Edge relabeling cost function.

Parameters
[in]edge_label_1An edge label.
[in]edge_label_2An edge label.
Returns
The cost of changing an edge's label from edge_label_1 to edge_label_2.
Note
Must be implemented by derived classes of ged::EditCosts.

Reimplemented from ged::EditCosts< UserNodeLabel, UserEdgeLabel >.

◆ node_del_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::Letter< UserNodeLabel, UserEdgeLabel >::node_del_cost_fun ( const UserNodeLabel &  node_label) const
finalvirtual

Node deletion cost function.

Parameters
[in]node_labelA node label.
Returns
The cost of deleting a node with label node_label.
Note
Must be implemented by derived classes of ged::EditCosts.

Reimplemented from ged::EditCosts< UserNodeLabel, UserEdgeLabel >.

◆ node_ins_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::Letter< UserNodeLabel, UserEdgeLabel >::node_ins_cost_fun ( const UserNodeLabel &  node_label) const
finalvirtual

Node insertions cost function.

Parameters
[in]node_labelA node label.
Returns
The cost of inserting a node with label node_label.
Note
Must be implemented by derived classes of ged::EditCosts.

Reimplemented from ged::EditCosts< UserNodeLabel, UserEdgeLabel >.

◆ node_rel_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::Letter< UserNodeLabel, UserEdgeLabel >::node_rel_cost_fun ( const UserNodeLabel &  node_label_1,
const UserNodeLabel &  node_label_2 
) const
finalvirtual

Node relabeling cost function.

Parameters
[in]node_label_1A node label.
[in]node_label_2A node label.
Returns
The cost of changing a node's label from node_label_1 to node_label_2.
Note
Must be implemented by derived classes of ged::EditCosts.

Reimplemented from ged::EditCosts< UserNodeLabel, UserEdgeLabel >.


The documentation for this class was generated from the following file: