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

Implements constant edit cost functions. More...

#include <constant.hpp>

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

Public Member Functions

 Constant (double node_ins_cost=1, double node_del_cost=1, double node_rel_cost=1, double edge_ins_cost=1, double edge_del_cost=1, double edge_rel_cost=1)
 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::Constant< UserNodeLabel, UserEdgeLabel >

Implements constant edit cost functions.

Definition at line 38 of file constant.hpp.

Constructor & Destructor Documentation

◆ Constant()

template<class UserNodeLabel , class UserEdgeLabel >
ged::Constant< UserNodeLabel, UserEdgeLabel >::Constant ( double  node_ins_cost = 1,
double  node_del_cost = 1,
double  node_rel_cost = 1,
double  edge_ins_cost = 1,
double  edge_del_cost = 1,
double  edge_rel_cost = 1 
)

Constructor.

Parameters
[in]node_ins_cost
[in]node_del_cost
[in]node_rel_cost
[in]edge_ins_cost
[in]edge_del_cost
[in]edge_rel_cost
Note
Calling the constructor with the default arguments constructs uniform edit costs.

Definition at line 38 of file constant.ipp.

Member Function Documentation

◆ edge_del_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::Constant< 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 >.

Definition at line 80 of file constant.ipp.

◆ edge_ins_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::Constant< 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 >.

Definition at line 73 of file constant.ipp.

◆ edge_rel_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::Constant< 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 >.

Definition at line 87 of file constant.ipp.

◆ node_del_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::Constant< 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 >.

Definition at line 56 of file constant.ipp.

◆ node_ins_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::Constant< 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 >.

Definition at line 49 of file constant.ipp.

◆ node_rel_cost_fun()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::Constant< 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 >.

Definition at line 63 of file constant.ipp.


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