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

Computes an upper bound for general edit costs. More...

#include <ring.hpp>

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

Private Member Functions

virtual void lsape_set_default_options_ () final
 Sets all options that are not among the ones shared by all derived classes of ged::LSAPEBasedMethod to default values. More...
 
virtual std::string lsape_valid_options_string_ () const final
 Returns string of all valid options that are not among the ones shared by all derived classes of ged::LSAPEBasedMethod. More...
 
virtual bool lsape_parse_option_ (const std::string &option, const std::string &arg) final
 Parses one option that is not among the ones shared by all derived classes of ged::LSAPEBasedMethod. More...
 
virtual void lsape_init_ () final
 Initializes the method after initializing the global variables for the graphs. More...
 
virtual void lsape_init_graph_ (const GEDGraph &graph) final
 Initializes global variables for one graph. More...
 
virtual void lsape_populate_instance_ (const GEDGraph &g, const GEDGraph &h, DMatrix &master_problem) final
 Populates the LSAPE instance. More...
 
virtual void lsape_default_post_graph_init_ () final
 Default initializes the method at runtime after initializing the global variables for the graphs. More...
 
virtual void lsape_pre_graph_init_ (bool called_at_runtime) final
 Initializes the method at runtime or during initialization before initializing the global variables for the graphs. More...
 

Additional Inherited Members

- Public Member Functions inherited from ged::LSAPEBasedMethod< UserNodeLabel, UserEdgeLabel >
virtual ~LSAPEBasedMethod ()=0
 Pure virtual destructor. More...
 
 LSAPEBasedMethod (const GEDData< UserNodeLabel, UserEdgeLabel > &ged_data)
 Constructor. More...
 
void populate_instance_and_run_as_util (const GEDGraph &g, const GEDGraph &h, Result &result, DMatrix &lsape_instance)
 Runs the method with options specified by set_options() and provides access to constructed LSAPE instance. More...
 
void populate_instance (const GEDGraph &g, const GEDGraph &h, DMatrix &lsape_instance)
 Populates the LSAPE instance. More...
 
- Public Member Functions inherited from ged::GEDMethod< UserNodeLabel, UserEdgeLabel >
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 inherited from ged::LSAPEBasedMethod< UserNodeLabel, UserEdgeLabel >
LSAPESolver::Model lsape_model_
 Specifies model for optimal LSAPE solver.
 
LSAPESolver::GreedyMethod greedy_method_
 Specifies method for greedy LSAPE solver.
 
bool compute_lower_bound_
 Flag that should be set to true if and only if the method computes a lower bound.
 
bool solve_optimally_
 Flag that equals true if an optimal LSAPE solver is used and false if a greedy method is employed.
 
std::size_t num_threads_
 The number of threads to be used.
 
- Protected Attributes inherited from ged::GEDMethod< UserNodeLabel, UserEdgeLabel >
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.
 

Detailed Description

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

Computes an upper bound for general edit costs.

Implements the method Ring suggested in:

Supports the following option in addition to the ones supported by ged::LSAPEBasedMethod:

--<option> <arg> modified parameter default more information
--load <filename> path to existing configuration file not specified n.a.
--save <filename> path where to save configuration file not specified n.a.
--led-method LSAPE_OPTIMAL|LSAPE_GREEDY|GAMMA method for computing the layer distances LSAPE_OPTIMAL see S+SSPR paper
if not GAMMA, the method --sort-method has no effect
--sort-method STD|COUNTING the employed sorting algorithm COUNTING ged::util::counting_sort()
use counting sort if the number of different edge labels is constant
--init-evaluations <convertible to int greater 0> number of blackbox evaluations during initialization 50 see S+SSPR paper
--init-num-initial-solutions <convertible to int greater 0> number of initial solutions used for initialization 50 see S+SSPR paper
--init-mu <convertible to double between 0 and 1> parameter $\mu$ used for initialization 1 see S+SSPR paper

Definition at line 51 of file ring.hpp.

Member Function Documentation

◆ lsape_default_post_graph_init_()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::Ring< UserNodeLabel, UserEdgeLabel >::lsape_default_post_graph_init_ ( )
finalprivatevirtual

Default initializes the method at runtime after initializing the global variables for the graphs.

Note
Must be overridden by derived classes of ged::LSAPEBasedMethod that require default initialization at runtime after initializing the global variables for the graphs.

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

Definition at line 86 of file ring.ipp.

◆ lsape_init_()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::Ring< UserNodeLabel, UserEdgeLabel >::lsape_init_ ( )
finalprivatevirtual

Initializes the method after initializing the global variables for the graphs.

Note
Must be overridden by derived classes of ged::LSAPEBasedMethod that require custom initialization.

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

Definition at line 101 of file ring.ipp.

◆ lsape_init_graph_()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::Ring< UserNodeLabel, UserEdgeLabel >::lsape_init_graph_ ( const GEDGraph graph)
finalprivatevirtual

Initializes global variables for one graph.

Parameters
[in]graphGraph for which the global variables have to be initialized.
Note
Must be overridden by derived classes of ged::LSAPEBasedMethod that require to initialize custom global variables.

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

Definition at line 59 of file ring.ipp.

◆ lsape_parse_option_()

template<class UserNodeLabel , class UserEdgeLabel >
bool ged::Ring< UserNodeLabel, UserEdgeLabel >::lsape_parse_option_ ( const std::string &  option,
const std::string &  arg 
)
finalprivatevirtual

Parses one option that is not among the ones shared by all derived classes of ged::LSAPEBasedMethod.

Parameters
[in]optionThe name of the option.
[in]argThe argument of the option.
Returns
Returns true if option is a valid option name for the method and false otherwise.
Note
Must be overridden by derived classes of ged::LSAPEBasedMethod that have options that are not among the ones shared by all derived classes of ged::LSAPEBasedMethod.

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

Definition at line 205 of file ring.ipp.

◆ lsape_populate_instance_()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::Ring< UserNodeLabel, UserEdgeLabel >::lsape_populate_instance_ ( const GEDGraph g,
const GEDGraph h,
DMatrix lsape_instance 
)
finalprivatevirtual

Populates the LSAPE instance.

Parameters
[in]gInput graph.
[in]hInput graph.
[out]lsape_instanceLSAPE instance of size (n + 1) x (m + 1), where n and m are the number of nodes in g and h. The last row and the last column represent insertion and deletion.
Note
Must be overridden by derived classes of ged::LSAPEBasedMethod.

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

Definition at line 283 of file ring.ipp.

◆ lsape_pre_graph_init_()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::Ring< UserNodeLabel, UserEdgeLabel >::lsape_pre_graph_init_ ( bool  called_at_runtime)
finalprivatevirtual

Initializes the method at runtime or during initialization before initializing the global variables for the graphs.

Parameters
[in]called_at_runtimeEquals true if called at runtime and false if called during initialization. Must be overridden by derived classes of ged::LSAPEBasedMethod that require default initialization at runtime before initializing the global variables for the graphs.

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

Definition at line 77 of file ring.ipp.

◆ lsape_set_default_options_()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::Ring< UserNodeLabel, UserEdgeLabel >::lsape_set_default_options_ ( )
finalprivatevirtual

Sets all options that are not among the ones shared by all derived classes of ged::LSAPEBasedMethod to default values.

Note
Must be overridden by derived classes of ged::LSAPEBasedMethod that have options that are not among the ones shared by all derived classes of ged::LSAPEBasedMethod.

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

Definition at line 66 of file ring.ipp.

◆ lsape_valid_options_string_()

template<class UserNodeLabel , class UserEdgeLabel >
std::string ged::Ring< UserNodeLabel, UserEdgeLabel >::lsape_valid_options_string_ ( ) const
finalprivatevirtual

Returns string of all valid options that are not among the ones shared by all derived classes of ged::LSAPEBasedMethod.

Returns
String of the form "[--<option> <arg>] [...]".
Note
Must be overridden by derived classes of ged::LSAPEBasedMethod that have options that are not among the ones shared by all derived classes of ged::LSAPEBasedMethod.

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

Definition at line 198 of file ring.ipp.


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