|
GEDLIB
1.0
|
Uses ring structures for defining feature vectors for node edit operations. More...
#include <ring_ml.hpp>

Private Member Functions | |
| virtual void | ml_init_graph_ (const GEDGraph &graph) final |
| Initializes global variables for one graph. More... | |
| virtual void | ml_set_default_options_ () final |
| Sets all options that are not among the ones shared by all derived classes of ged::MLBasedMethod to default values. More... | |
| virtual std::string | ml_valid_options_string_ () const final |
| Returns string of all valid options that are not among the ones shared by all derived classes of ged::MLBasedMethod. More... | |
| virtual bool | ml_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::MLBasedMethod. More... | |
| virtual void | ml_init_feature_variables_ (const GEDGraph &g, const GEDGraph &h, std::size_t num_threads) final |
| Initializes variables that are used for populating the feature vectors of assignments between two input graphs. More... | |
| virtual void | ml_populate_substitution_feature_vector_ (const GEDGraph &g, const GEDGraph &h, GEDGraph::NodeID i, GEDGraph::NodeID k, std::vector< double > &feature_vector) final |
| Computes substitution feature vector. More... | |
| virtual void | ml_populate_deletion_feature_vector_ (const GEDGraph &g, GEDGraph::NodeID i, std::vector< double > &feature_vector) final |
| Computes deletion feature vector. More... | |
| virtual void | ml_populate_insertion_feature_vector_ (const GEDGraph &h, GEDGraph::NodeID k, std::vector< double > &feature_vector) final |
| Computes insertion feature vector. More... | |
| virtual std::size_t | ml_get_num_features_ () final |
| Returns the number of features. More... | |
| virtual void | ml_init_for_num_features_ () final |
| Initializes the derived class for running with feature vectors of size ged::MLBasedMethod::num_features_. More... | |
Additional Inherited Members | |
Public Member Functions inherited from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel > | |
| double | predict (const GEDGraph &g, const GEDGraph &h, const NodeMap::Assignment &assignment) |
| Predicts the type of a node assignment. More... | |
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 NodeMap & | get_node_map () const |
| Returns a graph matching. More... | |
Protected Attributes inherited from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel > | |
| std::size_t | num_features_ |
| The size of the feature vectors. | |
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. | |
Uses ring structures for defining feature vectors for node edit operations.
Implements the ring based feature vectors suggested in:
Supports the following option in addition to the ones supported by ged::MLBasedMethod:
--<option> <arg> | modified parameter | default | more information |
|---|---|---|---|
--led-method LSAPE_OPTIMAL|LSAPE_GREEDY|GAMMA | method for computing the layer distances | LSAPE_OPTIMAL | see PR 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 |
--topological-features TRUE|FALSE | decides whether to include features for representing the topologies of the graphs | TRUE | see PR paper |
--global-features TRUE|FALSE | decides whether to include features for representing global properties of the graphs | TRUE | see PR paper |
Definition at line 48 of file ring_ml.hpp.
|
finalprivatevirtual |
Returns the number of features.
Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 211 of file ring_ml.ipp.
|
finalprivatevirtual |
Initializes variables that are used for populating the feature vectors of assignments between two input graphs.
| [in] | g | Input graph. |
| [in] | h | Input graph. |
| [in] | num_threads | The number of available threads. |
Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 136 of file ring_ml.ipp.
|
finalprivatevirtual |
Initializes the derived class for running with feature vectors of size ged::MLBasedMethod::num_features_.
Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 192 of file ring_ml.ipp.
|
finalprivatevirtual |
Initializes global variables for one graph.
| [in] | graph | Graph for which the global variables have to be initialized. |
Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 53 of file ring_ml.ipp.
|
finalprivatevirtual |
Parses one option that is not among the ones shared by all derived classes of ged::MLBasedMethod.
| [in] | option | The name of the option. |
| [in] | arg | The argument of the option. |
option is a valid option name for the method and false otherwise. Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 77 of file ring_ml.ipp.
|
finalprivatevirtual |
Computes deletion feature vector.
| [in] | g | Input graph. |
| [in] | i | ID of node in g that has to be deleted. |
| [out] | feature_vector | Return variable. Empty when called. Must be of size ged::MLBasedMethod::num_features_ when exiting. |
Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 168 of file ring_ml.ipp.
|
finalprivatevirtual |
Computes insertion feature vector.
| [in] | h | Input graph. |
| [in] | k | ID of node in h that has to be inserted. |
| [out] | feature_vector | Return variable. Empty when called. Must be of size ged::MLBasedMethod::num_features_ when exiting. |
Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 180 of file ring_ml.ipp.
|
finalprivatevirtual |
Computes substitution feature vector.
| [in] | g | Input graph. |
| [in] | h | Input graph. |
| [in] | i | ID of node in g that has to be substituted. |
| [in] | k | ID of node in h that has to be substituted. |
| [out] | feature_vector | Return variable. Empty when called. Must be of size ged::MLBasedMethod::num_features_ when exiting. |
Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 155 of file ring_ml.ipp.
|
finalprivatevirtual |
Sets all options that are not among the ones shared by all derived classes of ged::MLBasedMethod to default values.
Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 60 of file ring_ml.ipp.
|
finalprivatevirtual |
Returns string of all valid options that are not among the ones shared by all derived classes of ged::MLBasedMethod.
Reimplemented from ged::MLBasedMethod< UserNodeLabel, UserEdgeLabel >.
Definition at line 70 of file ring_ml.ipp.
1.8.13