Definition
The class SubgraphChecker maintains a list of check-subgraph handler functions Checkers, which are used in order to test if a subgraph satsifies a given set of properties, or to compute the set of properties a given subgraph satisfies. The type check_subgraph_handler is a pointer to a check-subgraph handler function. Such a function, e.g. f, has to be declared as
AgdKey f(const graph& G, const list<edge>& E, KeySet& props, KeySet& satisfied, bool check_all);It has to test if input subgraph G
SubgraphChecker allows to add and remove functions from Checkers. New handler functions are added at the beginning of Checkers, i.e., a newly added handler is called before any other handler. Finally, a graph checker (cf. Sect. Graph Checker) is called, which has been passed to the constructor of SubgraphChecker.
#include < AGD/SubgraphChecker.h >
Creation
SubgraphChecker | C(GraphChecker& GC) | creates an instance C of type SubgraphChecker. |
Operations
bool | C.check(const leda_graph& G, const leda_list<leda_edge>& E, KeySet& props) | |
returns true iff G satisfies all properties in props. | ||
bool | C.check(const leda_graph& G, const leda_list<leda_edge>& E, KeySet& props, AgdKey& not_satisfied) | |
returns true if G satisfies all properties in props, otherwise false is returned and not_satsified is a property in props that is not satisfied by G. | ||
KeySet | C.get_properties(const leda_graph& G, const leda_list<leda_edge>& E, KeySet& props) | |
returns the set of all properties in props which are satisfied by G. | ||
list_item | C.add_checker(check_subgraph_handler f) | |
appends a new handler function f at the beginning of Checkers. Returns the corresponding list item. | ||
void | C.rem_checker(list_item it) | |
removes the check-handler function at position it in Checkers. Precondition: it is a list item in Checkers. |
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13