27 #ifndef SRC_ENV_RESULT_IPP_ 28 #define SRC_ENV_RESULT_IPP_ 52 if (node_maps_.empty()) {
53 return std::numeric_limits<double>::infinity();
55 return node_maps_.at(0).induced_cost();
61 node_maps_.emplace_back(num_nodes_g, num_nodes_h);
62 return (node_maps_.size() - 1);
68 node_maps_.emplace_back(node_map);
69 return (node_maps_.size() - 1);
75 return node_maps_.at(index_node_map);
81 for (std::size_t pos{0}; pos < index_node_map; pos++) {
82 if (node_maps_.at(pos) == node_maps_.at(index_node_map)) {
83 node_maps_.erase(node_maps_.begin() + index_node_map);
87 for (std::size_t pos{index_node_map + 1}; pos < node_maps_.size(); pos++) {
88 if (node_maps_.at(pos) == node_maps_.at(index_node_map)) {
89 node_maps_.erase(node_maps_.begin() + index_node_map);
96 std::vector<NodeMap> &
105 return node_maps_.size();
111 if (node_maps_.empty()) {
114 std::sort(node_maps_.begin(), node_maps_.end());
116 node_maps_.erase(node_maps_.begin() + num_node_maps + 1, node_maps_.end());
double upper_bound() const
Returns the upper bound for GED.
void set_lower_bound(double lower_bound)
Sets the lower bound for GED.
Result()
Default constructor.
double lower_bound() const
Returns the lower bound for GED.
std::size_t num_node_maps() const
Returns the number of node maps.
std::vector< NodeMap > & node_maps()
Provides access to all node maps.
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 ...
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...
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.
Global namespace for GEDLIB.
NodeMap & node_map(std::size_t index_node_map)
Provides access to a node map.