GEDLIB  1.0
Public Member Functions | List of all members
ged::Result Class Reference

A wrapper structure for the result of calls to ged::GEDMethod::run_as_util() and ged::GEDMethod::ged_run_(). More...

#include <result.hpp>

Public Member Functions

 Result ()
 Default constructor.
 
void set_lower_bound (double lower_bound)
 Sets the lower bound for GED. More...
 
double lower_bound () const
 Returns the lower bound for GED. More...
 
double upper_bound () const
 Returns the upper bound for GED. More...
 
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. More...
 
std::size_t add_node_map (const NodeMap &node_map)
 Adds a node map to the result. More...
 
NodeMapnode_map (std::size_t index_node_map)
 Provides access to a node map. More...
 
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 the case. More...
 
std::vector< NodeMap > & node_maps ()
 Provides access to all node maps. More...
 
std::size_t num_node_maps () const
 Returns the number of node maps. More...
 
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 maps. More...
 

Detailed Description

A wrapper structure for the result of calls to ged::GEDMethod::run_as_util() and ged::GEDMethod::ged_run_().

Definition at line 38 of file result.hpp.

Member Function Documentation

◆ add_node_map() [1/2]

std::size_t ged::Result::add_node_map ( std::size_t  num_nodes_g,
std::size_t  num_nodes_h 
)

Adds an empty node map to the result.

Parameters
[in]num_nodes_gNumber of nodes in first input graph.
[in]num_nodes_hNumber of nodes in second input graph.
Returns
The index of the newly added node map.

Definition at line 60 of file result.ipp.

◆ add_node_map() [2/2]

std::size_t ged::Result::add_node_map ( const NodeMap node_map)

Adds a node map to the result.

Parameters
[in]node_mapThe node map to be added to the result.
Returns
The index of the newly added node map.

Definition at line 67 of file result.ipp.

◆ is_non_redundant_node_map()

bool ged::Result::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 the case.

Parameters
[in]index_node_mapThe index of the node map whose non-redundancy should be ensured.
Returns
Boolean true if the node map at index_node_map is non-redundant and false otherwise.

Definition at line 80 of file result.ipp.

◆ lower_bound()

double ged::Result::lower_bound ( ) const

Returns the lower bound for GED.

Returns
The lower bound for GED stored in the result. Equals 0.0 by default.

Definition at line 45 of file result.ipp.

◆ node_map()

NodeMap & ged::Result::node_map ( std::size_t  index_node_map)

Provides access to a node map.

Parameters
[in]index_node_mapThe index of the node map.
Returns
Reference to the node map with index index_node_map.

Definition at line 74 of file result.ipp.

◆ node_maps()

std::vector< NodeMap > & ged::Result::node_maps ( )

Provides access to all node maps.

Returns
Reference to vector of node maps. If sort_node_maps_and_set_upper_bound() has been called, the vector is sorted w.r.t. non-decreasing induced costs.

Definition at line 98 of file result.ipp.

◆ num_node_maps()

std::size_t ged::Result::num_node_maps ( ) const

Returns the number of node maps.

Returns
The number of node maps stored in the result.

Definition at line 104 of file result.ipp.

◆ set_lower_bound()

void ged::Result::set_lower_bound ( double  lower_bound)

Sets the lower bound for GED.

Parameters
[in]lower_boundThe lower bound for GED.

Definition at line 39 of file result.ipp.

◆ sort_node_maps_and_set_upper_bound()

void ged::Result::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 maps.

Parameters
[in]num_node_mapsThe number of node maps to be retained. If smaller than the number of node maps contained in the result, the most expensive node maps are deleted.

Definition at line 110 of file result.ipp.

◆ upper_bound()

double ged::Result::upper_bound ( ) const

Returns the upper bound for GED.

Returns
The upper bound for GED stored in the result. Equals std::numeric_limits<double>::infinity() by default.
Note
Call sort_node_maps_and_set_upper_bound() to ensure that a call to this method returns the best upper bound.

Definition at line 51 of file result.ipp.


The documentation for this class was generated from the following files: