GEDLIB  1.0
Public Member Functions | List of all members
ged::GEDData< UserNodeLabel, UserEdgeLabel > Class Template Reference

Contains the standardized input data along with basic functionality. More...

#include <ged_data.hpp>

Public Member Functions

 ~GEDData ()
 Destructor.
 
std::size_t num_graphs () const
 Returns the number of graphs. More...
 
const GEDGraphgraph (GEDGraph::GraphID graph_id) const
 Provides access to a graph. More...
 
bool shuffled_graph_copies_available () const
 Checks if shuffled graph copies are available. More...
 
std::size_t num_graphs_without_shuffled_copies () const
 Returns the number of graphs in the instance without the shuffled copies. More...
 
GEDGraph::GraphID id_shuffled_graph_copy (GEDGraph::GraphID graph_id) const
 Returns ID of a graph's shuffled copy. More...
 
bool is_shuffled_graph_copy (GEDGraph::GraphID graph_id) const
 Checks if a graph is a shuffled copy of another graph. More...
 
std::vector< GEDGraph >::const_iterator begin () const
 Provides access to the graphs contained in the instance. More...
 
std::vector< GEDGraph >::const_iterator end () const
 Provides access to the graphs contained in the instance. More...
 
std::size_t num_node_labels () const
 Returns the number of node labels. More...
 
std::size_t num_edge_labels () const
 Returns the number of edge labels. More...
 
std::size_t max_num_nodes () const
 Returns maximal number of nodes. More...
 
std::size_t max_num_edges () const
 Returns maximal number of nodes. More...
 
double node_cost (LabelID label1, LabelID label2) const
 Returns node relabeling, insertion, or deletion cost. More...
 
void vectorize_node_label (LabelID node_label, std::vector< double > &vector_representation) const
 Computes a node label's representation as a real-valued vector. More...
 
double edge_cost (LabelID label1, LabelID label2) const
 Returns edge relabeling, insertion, or deletion cost. More...
 
void vectorize_edge_label (LabelID edge_label, std::vector< double > &vector_representation) const
 Computes an edge label's representation as a real-valued vector. More...
 
void save_node_map (const std::string &filename, GEDGraph::NodeID g_id, GEDGraph::NodeID h_id, const NodeMap &node_map, bool append=true) const
 Saves a node map. More...
 
void load_node_map (const std::string &filename, GEDGraph::NodeID g_id, GEDGraph::NodeID h_id, NodeMap &node_map) const
 Loads a node map from a file. More...
 
void compute_induced_cost (const GEDGraph &g, const GEDGraph &h, NodeMap &node_map) const
 Computes the edit cost between two graphs induced by a node map. More...
 
double swap_cost (const GEDGraph &g, const GEDGraph &h, const NodeMap::Assignment &assignment_1, const NodeMap::Assignment &assignment_2, NodeMap &node_map) const
 Computes the cost of swapping two assignments in a node map while leaving the node map unchanged. More...
 
void swap_assignments (const NodeMap::Assignment &assignment_1, const NodeMap::Assignment &assignment_2, double swap_cost, NodeMap &node_map) const
 Swaps two assignments in a node map. More...
 
bool quasimetric_costs () const
 Checks if the edit costs are quasimetric. More...
 
bool quasimetric_costs (const GEDGraph &g, const GEDGraph &h) const
 Checks if the edit costs between two graphs are quasimetric. More...
 
double max_node_edit_cost () const
 Returns the maximal node edit cost between any two graphs contained in the instance. More...
 
double max_edge_edit_cost () const
 Returns the maximal edge edit cost between any two graphs contained in the instance. More...
 
double max_edit_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the maximal edit cost between two graphs. More...
 
double min_edit_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the minimal edit cost between two graphs. More...
 
double max_node_edit_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the maximal node edit cost between two graphs. More...
 
double min_node_edit_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the minimal node edit cost between two graphs. More...
 
double max_edge_edit_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the maximal edge edit cost between two graphs. More...
 
double min_edge_edit_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the minimal edge edit cost between two graphs. More...
 
double max_node_del_cost (const GEDGraph &graph) const
 Returns the maximal cost of deleting a node contained in a graph. More...
 
double min_node_del_cost (const GEDGraph &graph) const
 Returns the minimal cost of deleting a node contained in a graph. More...
 
double mean_node_del_cost (const GEDGraph &graph) const
 Returns the mean cost of deleting a node contained in a graph. More...
 
double max_node_ins_cost (const GEDGraph &graph) const
 Returns the maximal cost of inserting a node contained in a graph. More...
 
double min_node_ins_cost (const GEDGraph &graph) const
 Returns the minimal cost of inserting a node contained in a graph. More...
 
double mean_node_ins_cost (const GEDGraph &graph) const
 Returns the mean cost of inserting a node contained in a graph. More...
 
double max_node_subs_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the maximal cost of substituting a node contained in a graph by a node contained in another graph. More...
 
double min_node_subs_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the minimal cost of substituting a node contained in a graph by a node contained in another graph. More...
 
double mean_node_subs_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the mean cost of substituting a node contained in a graph by a node contained in another graph. More...
 
double max_edge_del_cost (const GEDGraph &graph) const
 Returns the maximal cost of deleting a edge contained in a graph. More...
 
double min_edge_del_cost (const GEDGraph &graph) const
 Returns the minimal cost of deleting a edge contained in a graph. More...
 
double mean_edge_del_cost (const GEDGraph &graph) const
 Returns the mean cost of deleting a edge contained in a graph. More...
 
double max_edge_ins_cost (const GEDGraph &graph) const
 Returns the maximal cost of inserting a edge contained in a graph. More...
 
double min_edge_ins_cost (const GEDGraph &graph) const
 Returns the minimal cost of inserting a edge contained in a graph. More...
 
double mean_edge_ins_cost (const GEDGraph &graph) const
 Returns the mean cost of inserting a edge contained in a graph. More...
 
double max_edge_subs_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the maximal cost of substituting a edge contained in a graph by a edge contained in another graph. More...
 
double min_edge_subs_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the minimal cost of substituting a edge contained in a graph by a edge contained in another graph. More...
 
double mean_edge_subs_cost (const GEDGraph &g, const GEDGraph &h) const
 Returns the mean cost of substituting a edge contained in a graph by a edge contained in another graph. More...
 

Detailed Description

template<class UserNodeLabel, class UserEdgeLabel>
class ged::GEDData< UserNodeLabel, UserEdgeLabel >

Contains the standardized input data along with basic functionality.

All derived classes of ged::GEDMethod access the input graphs and their edit costs via this class.

Definition at line 55 of file ged_data.hpp.

Member Function Documentation

◆ begin()

template<class UserNodeLabel , class UserEdgeLabel >
std::vector< GEDGraph >::const_iterator ged::GEDData< UserNodeLabel, UserEdgeLabel >::begin ( ) const

Provides access to the graphs contained in the instance.

Returns
Constant iterator pointing to the first graph in the instance.
Note
The member functions begin() and end() provide access to both the original graphs and the shuffled copies. If necessary, use the member function is_shuffled_graph_copy() to check if a graph is a shuffle copy of another graph.

Definition at line 386 of file ged_data.ipp.

◆ compute_induced_cost()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDData< UserNodeLabel, UserEdgeLabel >::compute_induced_cost ( const GEDGraph g,
const GEDGraph h,
NodeMap node_map 
) const

Computes the edit cost between two graphs induced by a node map.

Parameters
[in]gInput graph.
[in]hInput graph.
[in,out]node_mapNode map whose induced edit cost is to be computed.

Definition at line 540 of file ged_data.ipp.

◆ edge_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::edge_cost ( LabelID  label1,
LabelID  label2 
) const

Returns edge relabeling, insertion, or deletion cost.

Parameters
[in]label1First edge label.
[in]label2Second edge label.
Returns
Edge relabeling cost if label1 and label2 are both different from ged::dummy_label(), edge insertion cost if label1 equals ged::dummy_label and label2 does not, edge deletion cost if label1 does not equal ged::dummy_label and label2 does, and 0 otherwise.

Definition at line 428 of file ged_data.ipp.

◆ end()

template<class UserNodeLabel , class UserEdgeLabel >
std::vector< GEDGraph >::const_iterator ged::GEDData< UserNodeLabel, UserEdgeLabel >::end ( ) const

Provides access to the graphs contained in the instance.

Returns
Constant iterator pointing to one position after the last graph in the instance.
Note
The member functions begin() and end() provide access to both the original graphs and the shuffled copies. If necessary, use the member function is_shuffled_graph_copy() to check if a graph is a shuffle copy of another graph.

Definition at line 393 of file ged_data.ipp.

◆ graph()

template<class UserNodeLabel , class UserEdgeLabel >
const GEDGraph & ged::GEDData< UserNodeLabel, UserEdgeLabel >::graph ( GEDGraph::GraphID  graph_id) const

Provides access to a graph.

Parameters
[in]graph_idThe ID of the graph.
Returns
Constant reference to the graph with ID graph_id.

Definition at line 325 of file ged_data.ipp.

◆ id_shuffled_graph_copy()

template<class UserNodeLabel , class UserEdgeLabel >
GEDGraph::GraphID ged::GEDData< UserNodeLabel, UserEdgeLabel >::id_shuffled_graph_copy ( GEDGraph::GraphID  graph_id) const

Returns ID of a graph's shuffled copy.

Parameters
[in]graph_idThe ID of the graph.
Returns
The ID of the shuffled copy of the graph with ID graph_id.

Definition at line 366 of file ged_data.ipp.

◆ is_shuffled_graph_copy()

template<class UserNodeLabel , class UserEdgeLabel >
bool ged::GEDData< UserNodeLabel, UserEdgeLabel >::is_shuffled_graph_copy ( GEDGraph::GraphID  graph_id) const

Checks if a graph is a shuffled copy of another graph.

Parameters
[in]graph_idThe ID of the graph.
Returns
Boolean true if the graph with ID graph_id is the shuffled copy of another graph.

Definition at line 379 of file ged_data.ipp.

◆ load_node_map()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDData< UserNodeLabel, UserEdgeLabel >::load_node_map ( const std::string &  filename,
GEDGraph::NodeID  g_id,
GEDGraph::NodeID  h_id,
NodeMap node_map 
) const

Loads a node map from a file.

Parameters
[in]filenameName of a file which contains a node map between the graphs with IDs g_id and h_id.
[in]g_idID of a graph.
[in]h_idID of a graph.
[out]node_mapNode map between the graphs with IDs g_id and h_id populated by the method.
Note
If the file contains more than one node map between the graphs with IDs g_id and h_id, the first node map is loaded.

Definition at line 501 of file ged_data.ipp.

◆ max_edge_del_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_edge_del_cost ( const GEDGraph graph) const

Returns the maximal cost of deleting a edge contained in a graph.

Parameters
[in]graphInput graph.
Returns
Maximal cost of deleting a edge contained in graph.

Definition at line 919 of file ged_data.ipp.

◆ max_edge_edit_cost() [1/2]

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_edge_edit_cost ( ) const

Returns the maximal edge edit cost between any two graphs contained in the instance.

Returns
Maximal edge edit cost.

Definition at line 903 of file ged_data.ipp.

◆ max_edge_edit_cost() [2/2]

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_edge_edit_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the maximal edge edit cost between two graphs.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Maximal node edit cost between the graphs g and h.

Definition at line 1037 of file ged_data.ipp.

◆ max_edge_ins_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_edge_ins_cost ( const GEDGraph graph) const

Returns the maximal cost of inserting a edge contained in a graph.

Parameters
[in]graphInput graph.
Returns
Maximal cost of inserting a edge contained in graph.

Definition at line 955 of file ged_data.ipp.

◆ max_edge_subs_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_edge_subs_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the maximal cost of substituting a edge contained in a graph by a edge contained in another graph.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Maximal cost of substituting a edge contained in g by a edge contained in h.

Definition at line 859 of file ged_data.ipp.

◆ max_edit_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_edit_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the maximal edit cost between two graphs.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Maximal edit cost between the graphs g and h.

Definition at line 991 of file ged_data.ipp.

◆ max_node_del_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_node_del_cost ( const GEDGraph graph) const

Returns the maximal cost of deleting a node contained in a graph.

Parameters
[in]graphInput graph.
Returns
Maximal cost of deleting a node contained in graph.

Definition at line 743 of file ged_data.ipp.

◆ max_node_edit_cost() [1/2]

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_node_edit_cost ( ) const

Returns the maximal node edit cost between any two graphs contained in the instance.

Returns
Maximal node edit cost.

Definition at line 727 of file ged_data.ipp.

◆ max_node_edit_cost() [2/2]

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_node_edit_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the maximal node edit cost between two graphs.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Maximal node edit cost between the graphs g and h.

Definition at line 1017 of file ged_data.ipp.

◆ max_node_ins_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_node_ins_cost ( const GEDGraph graph) const

Returns the maximal cost of inserting a node contained in a graph.

Parameters
[in]graphInput graph.
Returns
Maximal cost of inserting a node contained in graph.

Definition at line 779 of file ged_data.ipp.

◆ max_node_subs_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_node_subs_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the maximal cost of substituting a node contained in a graph by a node contained in another graph.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Maximal cost of substituting a node contained in g by a node contained in h.

Definition at line 815 of file ged_data.ipp.

◆ max_num_edges()

template<class UserNodeLabel , class UserEdgeLabel >
std::size_t ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_num_edges ( ) const

Returns maximal number of nodes.

Returns
Maximal number of nodes contained in the instance's graphs.

Definition at line 421 of file ged_data.ipp.

◆ max_num_nodes()

template<class UserNodeLabel , class UserEdgeLabel >
std::size_t ged::GEDData< UserNodeLabel, UserEdgeLabel >::max_num_nodes ( ) const

Returns maximal number of nodes.

Returns
Maximal number of nodes contained in the instance's graphs.

Definition at line 414 of file ged_data.ipp.

◆ mean_edge_del_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::mean_edge_del_cost ( const GEDGraph graph) const

Returns the mean cost of deleting a edge contained in a graph.

Parameters
[in]graphInput graph.
Returns
Mean cost of deleting a edge contained in graph.

Definition at line 930 of file ged_data.ipp.

◆ mean_edge_ins_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::mean_edge_ins_cost ( const GEDGraph graph) const

Returns the mean cost of inserting a edge contained in a graph.

Parameters
[in]graphInput graph.
Returns
Mean cost of inserting a edge contained in graph.

Definition at line 977 of file ged_data.ipp.

◆ mean_edge_subs_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::mean_edge_subs_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the mean cost of substituting a edge contained in a graph by a edge contained in another graph.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Mean cost of substituting a edge contained in g by a edge contained in h.

Definition at line 887 of file ged_data.ipp.

◆ mean_node_del_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::mean_node_del_cost ( const GEDGraph graph) const

Returns the mean cost of deleting a node contained in a graph.

Parameters
[in]graphInput graph.
Returns
Mean cost of deleting a node contained in graph.

Definition at line 765 of file ged_data.ipp.

◆ mean_node_ins_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::mean_node_ins_cost ( const GEDGraph graph) const

Returns the mean cost of inserting a node contained in a graph.

Parameters
[in]graphInput graph.
Returns
Mean cost of inserting a node contained in graph.

Definition at line 801 of file ged_data.ipp.

◆ mean_node_subs_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::mean_node_subs_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the mean cost of substituting a node contained in a graph by a node contained in another graph.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Mean cost of substituting a node contained in g by a node contained in h.

Definition at line 843 of file ged_data.ipp.

◆ min_edge_del_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::min_edge_del_cost ( const GEDGraph graph) const

Returns the minimal cost of deleting a edge contained in a graph.

Parameters
[in]graphInput graph.
Returns
Minimal cost of deleting a edge contained in graph.

Definition at line 944 of file ged_data.ipp.

◆ min_edge_edit_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::min_edge_edit_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the minimal edge edit cost between two graphs.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Minimal edge edit cost between the graphs g and h.

Definition at line 1047 of file ged_data.ipp.

◆ min_edge_ins_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::min_edge_ins_cost ( const GEDGraph graph) const

Returns the minimal cost of inserting a edge contained in a graph.

Parameters
[in]graphInput graph.
Returns
Minimal cost of inserting a edge contained in graph.

Definition at line 966 of file ged_data.ipp.

◆ min_edge_subs_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::min_edge_subs_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the minimal cost of substituting a edge contained in a graph by a edge contained in another graph.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Minimal cost of substituting a edge contained in g by a edge contained in h.

Definition at line 872 of file ged_data.ipp.

◆ min_edit_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::min_edit_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the minimal edit cost between two graphs.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Minimal edit cost between the graphs g and h.

Definition at line 1004 of file ged_data.ipp.

◆ min_node_del_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::min_node_del_cost ( const GEDGraph graph) const

Returns the minimal cost of deleting a node contained in a graph.

Parameters
[in]graphInput graph.
Returns
Minimal cost of deleting a node contained in graph.

Definition at line 754 of file ged_data.ipp.

◆ min_node_edit_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::min_node_edit_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the minimal node edit cost between two graphs.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Minimal node edit cost between the graphs g and h.

Definition at line 1027 of file ged_data.ipp.

◆ min_node_ins_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::min_node_ins_cost ( const GEDGraph graph) const

Returns the minimal cost of inserting a node contained in a graph.

Parameters
[in]graphInput graph.
Returns
Minimal cost of inserting a node contained in graph.

Definition at line 790 of file ged_data.ipp.

◆ min_node_subs_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::min_node_subs_cost ( const GEDGraph g,
const GEDGraph h 
) const

Returns the minimal cost of substituting a node contained in a graph by a node contained in another graph.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Minimal cost of substituting a node contained in g by a node contained in h.

Definition at line 828 of file ged_data.ipp.

◆ node_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::node_cost ( LabelID  label1,
LabelID  label2 
) const

Returns node relabeling, insertion, or deletion cost.

Parameters
[in]label1First node label.
[in]label2Second node label.
Returns
Node relabeling cost if label1 and label2 are both different from ged::dummy_label(), node insertion cost if label1 equals ged::dummy_label and label2 does not, node deletion cost if label1 does not equal ged::dummy_label and label2 does, and 0 otherwise.

Definition at line 454 of file ged_data.ipp.

◆ num_edge_labels()

template<class UserNodeLabel , class UserEdgeLabel >
std::size_t ged::GEDData< UserNodeLabel, UserEdgeLabel >::num_edge_labels ( ) const

Returns the number of edge labels.

Returns
Number of different edge labels contained in the instance.

Definition at line 407 of file ged_data.ipp.

◆ num_graphs()

template<class UserNodeLabel , class UserEdgeLabel >
std::size_t ged::GEDData< UserNodeLabel, UserEdgeLabel >::num_graphs ( ) const

Returns the number of graphs.

Returns
Number of graphs in the instance.

Definition at line 318 of file ged_data.ipp.

◆ num_graphs_without_shuffled_copies()

template<class UserNodeLabel , class UserEdgeLabel >
std::size_t ged::GEDData< UserNodeLabel, UserEdgeLabel >::num_graphs_without_shuffled_copies ( ) const

Returns the number of graphs in the instance without the shuffled copies.

Returns
Number of graphs without shuffled copies contained in the instance.

Definition at line 359 of file ged_data.ipp.

◆ num_node_labels()

template<class UserNodeLabel , class UserEdgeLabel >
std::size_t ged::GEDData< UserNodeLabel, UserEdgeLabel >::num_node_labels ( ) const

Returns the number of node labels.

Returns
Number of different node labels contained in the instance.

Definition at line 400 of file ged_data.ipp.

◆ quasimetric_costs() [1/2]

template<class UserNodeLabel , class UserEdgeLabel >
bool ged::GEDData< UserNodeLabel, UserEdgeLabel >::quasimetric_costs ( ) const

Checks if the edit costs are quasimetric.

Returns
Boolean true if the edit costs are quasimetric and false otherwise.

Definition at line 669 of file ged_data.ipp.

◆ quasimetric_costs() [2/2]

template<class UserNodeLabel , class UserEdgeLabel >
bool ged::GEDData< UserNodeLabel, UserEdgeLabel >::quasimetric_costs ( const GEDGraph g,
const GEDGraph h 
) const

Checks if the edit costs between two graphs are quasimetric.

Parameters
[in]gInput graph.
[in]hInput graph.
Returns
Boolean true if the edit costs between the graphs g and h quasimetric and false otherwise.

Definition at line 690 of file ged_data.ipp.

◆ save_node_map()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDData< UserNodeLabel, UserEdgeLabel >::save_node_map ( const std::string &  filename,
GEDGraph::NodeID  g_id,
GEDGraph::NodeID  h_id,
const NodeMap node_map,
bool  append = true 
) const

Saves a node map.

Parameters
[in]filenameName of the file where the node map should be saved.
[in]g_idID of a graph.
[in]h_idID of a graph.
[in]node_mapNode map between the graphs with IDs g_id and h_id.
[in]appendBoolean true if the node map should be appended to the file and false if the file should be overridden.

Definition at line 480 of file ged_data.ipp.

◆ shuffled_graph_copies_available()

template<class UserNodeLabel , class UserEdgeLabel >
bool ged::GEDData< UserNodeLabel, UserEdgeLabel >::shuffled_graph_copies_available ( ) const

Checks if shuffled graph copies are available.

Returns
Boolean true if shuffled graph copies are available.

Definition at line 352 of file ged_data.ipp.

◆ swap_assignments()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDData< UserNodeLabel, UserEdgeLabel >::swap_assignments ( const NodeMap::Assignment &  assignment_1,
const NodeMap::Assignment &  assignment_2,
double  swap_cost,
NodeMap node_map 
) const

Swaps two assignments in a node map.

Parameters
assignment_1First assignment.
assignment_2Second assignment.
swap_costThe cost of swapping assignment_1 and assignment_2 in node_map. Can be computed by call to swap_cost().
node_mapThe node map. Must contain the assignment_1 and assignment_2 in its relational representation.

Definition at line 656 of file ged_data.ipp.

◆ swap_cost()

template<class UserNodeLabel , class UserEdgeLabel >
double ged::GEDData< UserNodeLabel, UserEdgeLabel >::swap_cost ( const GEDGraph g,
const GEDGraph h,
const NodeMap::Assignment &  assignment_1,
const NodeMap::Assignment &  assignment_2,
NodeMap node_map 
) const

Computes the cost of swapping two assignments in a node map while leaving the node map unchanged.

Parameters
[in]gInput graph.
[in]hInput graph.
[in]assignment_1First assignment.
[in]assignment_2Second assignment.
[in]node_mapThe node map. Must contain the assignment_1 and assignment_2 in its relational representation.
Returns
The cost of swapping assignment_1 and assignment_2 in node_map.

Definition at line 570 of file ged_data.ipp.

◆ vectorize_edge_label()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDData< UserNodeLabel, UserEdgeLabel >::vectorize_edge_label ( LabelID  edge_label,
std::vector< double > &  vector_representation 
) const

Computes an edge label's representation as a real-valued vector.

Parameters
[in]edge_labelAn edge label.
[out]vector_representationThe edge label's vector representation.
Note
If the selected edit costs do not override ged::EditCosts::vectorize_edge_label(), vector_representation is empty.

Definition at line 447 of file ged_data.ipp.

◆ vectorize_node_label()

template<class UserNodeLabel , class UserEdgeLabel >
void ged::GEDData< UserNodeLabel, UserEdgeLabel >::vectorize_node_label ( LabelID  node_label,
std::vector< double > &  vector_representation 
) const

Computes a node label's representation as a real-valued vector.

Parameters
[in]node_labelA node label.
[out]vector_representationThe node label's vector representation.
Note
If the selected edit costs do not override ged::EditCosts::vectorize_node_label(), vector_representation is empty.

Definition at line 473 of file ged_data.ipp.


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