GEDLIB  1.0
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
ged::GEDMethod< UserNodeLabel, UserEdgeLabel > Class Template Referenceabstract

Abstract class for the (suboptimal) computation of the graph edit distance. More...

#include <ged_method.hpp>

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

Public Member Functions

virtual ~GEDMethod ()=0
 Pure virtual destructor. More...
 
 GEDMethod (const GEDData< UserNodeLabel, UserEdgeLabel > &ged_data)
 Constructor. More...
 
void set_options (const std::string &options)
 Sets the options of the method. More...
 
void run (GEDGraph::GraphID g_id, GEDGraph::GraphID h_id)
 Runs the method with options specified by set_options(). More...
 
void run_as_util (const GEDGraph &g, const GEDGraph &h, Result &result)
 Runs the method with options specified by set_options(). More...
 
void init ()
 Initializes the method with options specified by set_options().
 
double get_upper_bound () const
 Returns an upper bound. More...
 
double get_lower_bound () const
 Returns a lower bound. More...
 
Seconds get_runtime () const
 Returns the runtime. More...
 
Seconds get_init_time () const
 Returns the initialization time. More...
 
const NodeMapget_node_map () const
 Returns a graph matching. More...
 

Protected Attributes

bool initialized_
 A flag that equals true if init() has been called and false otherwise.
 
const GEDData< UserNodeLabel, UserEdgeLabel > & ged_data_
 The data on which the method is run.
 

Private Member Functions

virtual void ged_init_ ()
 Initializes the method. More...
 
virtual void ged_run_ (const GEDGraph &g, const GEDGraph &h, Result &result)
 Runs the method with options specified by set_options(). More...
 
virtual bool ged_parse_option_ (const std::string &option, const std::string &arg)
 Parses one option. More...
 
virtual std::string ged_valid_options_string_ () const
 Returns string of all valid options. More...
 
virtual void ged_set_default_options_ ()
 Sets all options to default values. More...
 

Detailed Description

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

Abstract class for the (suboptimal) computation of the graph edit distance.

Definition at line 40 of file ged_method.hpp.

Constructor & Destructor Documentation

◆ ~GEDMethod()

template<class UserNodeLabel , class UserEdgeLabel >
ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::~GEDMethod ( )
pure virtual

Pure virtual destructor.

Note
Must be implemented by derived classes.

Definition at line 35 of file ged_method.ipp.

◆ GEDMethod()

template<class UserNodeLabel , class UserEdgeLabel >
ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::GEDMethod ( const GEDData< UserNodeLabel, UserEdgeLabel > &  ged_data)

Constructor.

Parameters
[in]ged_dataThe instance on which the method should be run.

Definition at line 39 of file ged_method.ipp.

Member Function Documentation

◆ ged_init_()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::ged_init_ ( )
privatevirtual

◆ ged_parse_option_()

template<class UserNodeLabel , class UserEdgeLabel >
bool ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::ged_parse_option_ ( const std::string &  option,
const std::string &  arg 
)
privatevirtual

Parses one option.

Parameters
[in]optionThe name of the option.
[in]argThe argument of the option.
Returns
Boolean true if option is a valid option name for the method and false otherwise.
Note
Must be overridden by derived classes that have options.

Reimplemented in ged::AnchorAwareGED< UserNodeLabel, UserEdgeLabel >, ged::BranchTight< UserNodeLabel, UserEdgeLabel >, ged::LSAPEBasedMethod< UserNodeLabel, UserEdgeLabel >, ged::LSBasedMethod< UserNodeLabel, UserEdgeLabel >, ged::BranchCompact< UserNodeLabel, UserEdgeLabel >, ged::MIPBasedMethod< UserNodeLabel, UserEdgeLabel >, ged::SimulatedAnnealing< UserNodeLabel, UserEdgeLabel >, ged::Hybrid< UserNodeLabel, UserEdgeLabel >, and ged::HED< UserNodeLabel, UserEdgeLabel >.

Definition at line 253 of file ged_method.ipp.

◆ ged_run_()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::ged_run_ ( const GEDGraph g,
const GEDGraph h,
Result result 
)
privatevirtual

◆ ged_set_default_options_()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::ged_set_default_options_ ( )
privatevirtual

◆ ged_valid_options_string_()

template<class UserNodeLabel , class UserEdgeLabel >
std::string ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::ged_valid_options_string_ ( ) const
privatevirtual

◆ get_init_time()

template<class UserNodeLabel , class UserEdgeLabel >
Seconds ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::get_init_time ( ) const

Returns the initialization time.

Returns
Runtime of last call to init() in seconds.

Definition at line 60 of file ged_method.ipp.

◆ get_lower_bound()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::get_lower_bound ( ) const

Returns a lower bound.

Returns
Lower bound for graph edit distance provided by last call to run() or -1 if the method does not yield a lower bound.

Definition at line 74 of file ged_method.ipp.

◆ get_node_map()

template<class UserNodeLabel , class UserEdgeLabel >
const NodeMap & ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::get_node_map ( ) const

Returns a graph matching.

Returns
Constant reference to graph matching provided by last call to run() or to an empty matching if the method does not yield a matching.

Definition at line 67 of file ged_method.ipp.

◆ get_runtime()

template<class UserNodeLabel , class UserEdgeLabel >
Seconds ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::get_runtime ( ) const

Returns the runtime.

Returns
Runtime of last call to run() in seconds.

Definition at line 53 of file ged_method.ipp.

◆ get_upper_bound()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::get_upper_bound ( ) const

Returns an upper bound.

Returns
Upper bound for graph edit distance provided by last call to run() or -1 if the method does not yield an upper bound.

Definition at line 92 of file ged_method.ipp.

◆ run()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::run ( GEDGraph::GraphID  g_id,
GEDGraph::GraphID  h_id 
)

Runs the method with options specified by set_options().

Parameters
[in]g_idID of input graph.
[in]h_idID of input graph.

Definition at line 113 of file ged_method.ipp.

◆ run_as_util()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::run_as_util ( const GEDGraph g,
const GEDGraph h,
Result result 
)

Runs the method with options specified by set_options().

Parameters
[in]gInput graph.
[in]hInput graph.
[out]resultResult variable.

Definition at line 129 of file ged_method.ipp.

◆ set_options()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDMethod< UserNodeLabel, UserEdgeLabel >::set_options ( const std::string &  options)

Sets the options of the method.

Parameters
[in]optionsString of the form [–<option> <arg>] [...], where option contains neither spaces nor single quotes, and arg contains neither spaces nor single quotes or is of the form '[–<sub-option> <sub-arg>] [...]', where both sub-option and sub-arg contain neither spaces nor single quotes.

Definition at line 99 of file ged_method.ipp.


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