GEDLIB
1.0
|
Contains miscellaneous utility functions. More...
Functions | |
template<class Solver > | |
void | construct_node_map_from_solver (const Solver &solver, NodeMap &node_map, std::size_t solution_id=0) |
Constructs a node map from a solution to LSAPE or LSAPE stored in a ged::LSAPESolver or a ged::LSAPSolver object. More... | |
void | counting_sort (std::vector< LabelID >::iterator first, std::vector< LabelID >::iterator last) |
Implementation of counting sort. More... | |
void | init_adj_matrix (const GEDGraph &graph, DMatrix &adj_matrix) |
Initalizes the adjacency matrix of a graph. More... | |
void | parse_config_file (const std::string &filename, std::map< std::string, std::string > &options) |
Parses a configuration file. More... | |
void | save_as_config_file (const std::string &filename, const std::map< std::string, std::string > &options) |
Saves a string map as a configuration file as expected by parse_config_file(). More... | |
Contains miscellaneous utility functions.
void ged::util::construct_node_map_from_solver | ( | const Solver & | solver, |
NodeMap & | node_map, | ||
std::size_t | solution_id = 0 |
||
) |
Constructs a node map from a solution to LSAPE or LSAPE stored in a ged::LSAPESolver or a ged::LSAPSolver object.
Solver | Must be either ged::LSAPESolver or ged::LSAPSolver. |
[in] | solver | Solver object that has been solved by call to ged::LSAPESolver::solve() or ged::LSAPSolver::solve(), respectively. |
[out] | node_map | The constructed node map. |
[in] | solution_id | The ID of the solution stored in solver from which the matching should be constructed. |
void ged::util::counting_sort | ( | std::vector< LabelID >::iterator | first, |
std::vector< LabelID >::iterator | last | ||
) |
Implementation of counting sort.
[in] | first | Iterator to first element in subvector that should be sorted. |
[in] | last | Iterator to last element in subvector that should be sorted. |
void ged::util::parse_config_file | ( | const std::string & | filename, |
std::map< std::string, std::string > & | options | ||
) |
void ged::util::save_as_config_file | ( | const std::string & | filename, |
const std::map< std::string, std::string > & | options | ||
) |
Saves a string map as a configuration file as expected by parse_config_file().
[in] | filename | Name of the configuration file that should be created. |
[in] | options | String map that should be saved as a configuration file. |