27 #ifndef SRC_METHODS_LS_BASED_METHOD_HPP_ 28 #define SRC_METHODS_LS_BASED_METHOD_HPP_ 51 template<
class UserNodeLabel,
class UserEdgeLabel>
79 std::string initialization_options_;
83 std::string lower_bound_method_options_;
85 double random_substitution_ratio_;
87 std::size_t num_initial_solutions_;
89 double ratio_runs_from_initial_solutions_;
91 std::size_t num_randpost_loops_;
93 std::size_t max_randpost_retrials_;
95 double randpost_penalty_;
97 double randpost_decay_;
99 std::string logfile_name_;
101 bool use_real_randomness_;
109 virtual
bool ged_parse_option_(const std::
string & option, const std::
string & arg) final;
117 std::
size_t num_runs_from_initial_solutions_() const;
121 void generate_random_initial_node_maps_(const
GEDGraph & g, const
GEDGraph & h, std::vector<
NodeMap> & initial_node_maps);
123 void generate_lsape_based_initial_node_maps_(const
GEDGraph & g, const
GEDGraph & h, std::vector<
NodeMap> & initial_node_maps,
Result & result);
125 double update_counts_matrix_and_visited_node_maps_(const std::vector<
NodeMap> & result_node_maps, const std::vector<
bool> & is_converged_node_map, const
double & upper_bound,
126 const
double & lower_bound, std::vector<
NodeMap> & visited_node_maps, std::
size_t loop, std::vector<std::vector<
double>> & counts_matrix) const;
128 void generate_node_maps_from_counts_matrix_(const
GEDGraph & g, const
GEDGraph & h,const std::vector<std::vector<
double>> & counts_matrix, std::vector<
NodeMap> & visited_node_maps, std::vector<
NodeMap> & initial_node_maps) const;
164 virtual
bool ls_parse_option_(const std::
string & option, const std::
string & arg);
Abstract class for methods that use variants of local search for upper bounding the graph edit distan...
Contains the standardized input data along with basic functionality.
virtual void ls_runtime_init_(const GEDGraph &g, const GEDGraph &h)
Initializes the method for a run between two graphs.
A wrapper structure for the result of calls to ged::GEDMethod::run_as_util() and ged::GEDMethod::ged_...
Abstract class for the (suboptimal) computation of the graph edit distance.
LSBasedMethod(const GEDData< UserNodeLabel, UserEdgeLabel > &ged_data)
Constructor.
virtual std::string ged_valid_options_string_() const final
Returns string of all valid options.
virtual bool ls_parse_option_(const std::string &option, const std::string &arg)
Parses one option that is not among the ones shared by all derived classes of ged::LSBasedMethod.
virtual ~LSBasedMethod()=0
Pure virtual destructor.
virtual void ged_run_(const GEDGraph &g, const GEDGraph &h, Result &result) final
Runs the method with options specified by set_options().
Abstract class for methods that use lossy transformations to LSAPE for approximating the graph edit d...
std::size_t num_threads_
The number of threads to be used.
virtual void ls_init_()
Initializes the method.
virtual std::string ls_valid_options_string_() const
Returns string of all valid options that are not among the ones shared by all derived classes of ged:...
virtual void ged_init_() final
Initializes the method.
The normalized input graphs used by GEDLIB. All labels are integers.
Global namespace for GEDLIB.
virtual void ged_set_default_options_() final
Sets all options to default values.
virtual void ls_run_from_initial_solution_(const GEDGraph &g, const GEDGraph &h, double lower_bound, const NodeMap &initial_node_map, NodeMap &output_node_map)
Runs the local search from an initial node map.
virtual bool ged_parse_option_(const std::string &option, const std::string &arg) final
Parses one option.
virtual void ls_set_default_options_()
Sets all options that are not among the ones shared by all derived classes of ged::LSBasedMethod to d...