GEDLIB  1.0
blp_no_edge_labels.hpp
Go to the documentation of this file.
1 /***************************************************************************
2 * *
3 * Copyright (C) 2018 by David B. Blumenthal *
4 * *
5 * This file is part of GEDLIB. *
6 * *
7 * GEDLIB is free software: you can redistribute it and/or modify it *
8 * under the terms of the GNU Lesser General Public License as published *
9 * by the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * GEDLIB is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU Lesser General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License along with GEDLIB. If not, see <http://www.gnu.org/licenses/>. *
19 * *
20 ***************************************************************************/
21 
27 #ifndef SRC_METHODS_BLP_NO_EDGE_LABELS_HPP_
28 #define SRC_METHODS_BLP_NO_EDGE_LABELS_HPP_
29 
30 namespace ged {
31 
43 template<class UserNodeLabel, class UserEdgeLabel>
44 class BLPNoEdgeLabels : public MIPBasedMethod<UserNodeLabel, UserEdgeLabel> {
45 
46 public:
47 
48  virtual ~BLPNoEdgeLabels();
49 
51 
52 private:
53 
54  std::map<NodeMap::Assignment, GRBVar> x_;
55 
56  std::map<NodeMap::Assignment, GRBVar> s_;
57 
58  std::map<NodeMap::Assignment, GRBVar> t_;
59 
60  // Virtual member functions inherited from MIPBasedMethod.
61 
62  virtual void mip_populate_model_(const GEDGraph & g, const GEDGraph & h, GRBModel & model) final;
63 
64  virtual void mip_model_to_node_map_(const GEDGraph & g, const GEDGraph & h, GRBModel & model, NodeMap & node_map) final;
65 
66  virtual bool mip_model_to_lsape_projection_problem_(const GEDGraph & g, const GEDGraph & h, GRBModel & model, DMatrix & lsape_instance) final;
67 
68  // Private helper function.
69 
70  char variable_type_() const;
71 
72 };
73 
74 }
75 
76 
77 
78 #endif /* SRC_METHODS_BLP_NO_EDGE_LABELS_HPP_ */
Contains the standardized input data along with basic functionality.
Definition: ged_data.hpp:55
A class for node maps.
Definition: node_map.hpp:43
virtual bool mip_model_to_lsape_projection_problem_(const GEDGraph &g, const GEDGraph &h, GRBModel &model, DMatrix &lsape_instance) final
Given a, possibly sub-optimally, solved model, this method constructs an LSAPE instance for projectin...
Binary linear programming formulation of the graph edit distance without edge labels.
virtual void mip_populate_model_(const GEDGraph &g, const GEDGraph &h, GRBModel &model) final
Runs the local search from an initial node map.
The normalized input graphs used by GEDLIB. All labels are integers.
Definition: ged_graph.hpp:104
Global namespace for GEDLIB.
virtual void mip_model_to_node_map_(const GEDGraph &g, const GEDGraph &h, GRBModel &model, NodeMap &node_map) final
Given a, possibly sub-optimally, solved unrelaxed model, this method constructs a node map and sets i...
Abstract class for methods that use mixed integer linear programming for exactly or approximatively c...