GEDLIB  1.0
result.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_ENV_RESULT_HPP_
28 #define SRC_ENV_RESULT_HPP_
29 
30 #include "common_types.hpp"
31 #include "node_map.hpp"
32 
33 namespace ged {
34 
38 class Result {
39 
40 public:
41 
45  Result();
46 
51  void set_lower_bound(double lower_bound);
52 
57  double lower_bound() const;
58 
64  double upper_bound() const;
65 
72  std::size_t add_node_map(std::size_t num_nodes_g, std::size_t num_nodes_h);
73 
79  std::size_t add_node_map(const NodeMap & node_map);
80 
86  NodeMap & node_map(std::size_t index_node_map);
87 
93  bool is_non_redundant_node_map(std::size_t index_node_map);
94 
99  std::vector<NodeMap> & node_maps();
100 
105  std::size_t num_node_maps() const;
106 
111  void sort_node_maps_and_set_upper_bound(std::size_t num_node_maps = std::numeric_limits<std::size_t>::max());
112 
113 private:
114 
115  std::vector<NodeMap> node_maps_;
116 
117  double lower_bound_;
118 };
119 
120 }
121 
122 #include "result.ipp"
123 
124 #endif /* SRC_ENV_RESULT_HPP_ */
double upper_bound() const
Returns the upper bound for GED.
Definition: result.ipp:51
A class for node maps.
Definition: node_map.hpp:43
void set_lower_bound(double lower_bound)
Sets the lower bound for GED.
Definition: result.ipp:39
ged::NodeMap class declaration.
Result()
Default constructor.
Definition: result.ipp:33
double lower_bound() const
Returns the lower bound for GED.
Definition: result.ipp:45
std::size_t num_node_maps() const
Returns the number of node maps.
Definition: result.ipp:104
std::vector< NodeMap > & node_maps()
Provides access to all node maps.
Definition: result.ipp:98
A wrapper structure for the result of calls to ged::GEDMethod::run_as_util() and ged::GEDMethod::ged_...
Definition: result.hpp:38
ged::Result struct definition.
void sort_node_maps_and_set_upper_bound(std::size_t num_node_maps=std::numeric_limits< std::size_t >::max())
Sorts the vector of node maps w.r.t non-decreasing induced cost and possibly discards expensive node ...
Definition: result.ipp:110
bool is_non_redundant_node_map(std::size_t index_node_map)
Checks if a node map is already contained in the vector of all node maps and removes it if this is th...
Definition: result.ipp:80
std::size_t add_node_map(std::size_t num_nodes_g, std::size_t num_nodes_h)
Adds an empty node map to the result.
Definition: result.ipp:60
Type declarations used by various classes.
Global namespace for GEDLIB.
NodeMap & node_map(std::size_t index_node_map)
Provides access to a node map.
Definition: result.ipp:74