GEDLIB  1.0
bipartite.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_BIPARTITE_HPP_
28 #define SRC_METHODS_BIPARTITE_HPP_
29 
30 namespace ged {
31 
41 template<class UserNodeLabel, class UserEdgeLabel>
42 class Bipartite : public LSAPEBasedMethod<UserNodeLabel, UserEdgeLabel> {
43 
44 public:
45 
46  virtual ~Bipartite();
47 
49 
50 private:
51 
52  // Inherited member functions from LSAPEBasedMethod.
53 
54  virtual void lsape_populate_instance_(const GEDGraph & g, const GEDGraph & h, DMatrix & lsape_instance) final;
55 
56  // Helper member functions.
57 
58  double compute_substitution_cost_(const GEDGraph & g, const GEDGraph & h, GEDGraph::NodeID i, GEDGraph::NodeID k) const;
59 
60  double compute_deletion_cost_(const GEDGraph & g, GEDGraph::NodeID i) const;
61 
62  double compute_insertion_cost_(const GEDGraph & h, GEDGraph::NodeID k) const;
63 };
64 
65 }
66 
67 #endif /* SRC_METHODS_BIPARTITE_HPP_ */
Contains the standardized input data along with basic functionality.
Definition: ged_data.hpp:55
virtual void lsape_populate_instance_(const GEDGraph &g, const GEDGraph &h, DMatrix &lsape_instance) final
Populates the LSAPE instance.
Definition: bipartite.ipp:47
Computes lower and upper bounds for general edit costs.
Definition: bipartite.hpp:42
Abstract class for methods that use lossy transformations to LSAPE for approximating the graph edit d...
The normalized input graphs used by GEDLIB. All labels are integers.
Definition: ged_graph.hpp:104
Global namespace for GEDLIB.
std::size_t NodeID
Internally used vertex ID type.
Definition: ged_graph.hpp:108