Implements debugging tools that checks whether a given list of vertices constitutes a legitimate tree structure. More...
Go to the source code of this file.
Functions | |
template<class typeparams > | |
int | sanity_check_tree (list< vertex_t * > &list_vertices_in) |
Checks whether the given list vertices is a tree structure. | |
template<class typeparams > | |
int | sanity_check_monotonicty (list< vertex_t * > &list_vertices_in) |
Checks whether the given list vertices satisfies the monotonicity constraint. | |
template<class typeparams > | |
int | sanity_check_additivity (list< vertex_t * > &list_vertices_in) |
Checks whether the given list vertices satisfies the additivity constraint. |
Implements debugging tools that checks whether a given list of vertices constitutes a legitimate tree structure.
This file provides functions that check whether a given list of vertices is in fact a tree structure. The sanity_check_tree function checks whether a given list of vertices is an (undirected) tree structure, i.e., it has a root vertex and every other vertex has a single parent. The sanity_check_additivity function checks whether the cost along the edges and vertices of a given tree satisfies the additivity constraint. Finally, the sanity_check_monotonicty function checks whether the costs along the edges and vertices of a given tree satisfies the monotonicity constraint. See the documentation of each function for further details.