Definition
The class ClusterGraphChecker maintains a list of check-cluster-graph handler functions Checkers, which are used in order to test if a cluster graph satsifies a given set of properties, or to compute the set of properties a given cluster graph satisfies. The type check_clustergraph_handler is a pointer to a check-cluster-graph handler function. Such a function, e.g. f, has to be declared as
AgdKey f(const ClusterGraph& CG, KeySet& props, KeySet& satisfied, bool check_all);It has to test if input cluster graph CG satisfies the properties in props. Each property that has been checked must be removed from props. If check_all is true, each satisfied property is added to satsified. If check_all is false, f returns an unsatisfied property or a nil key (cf. Sect. Keys) if it cannot find an unsatisfied property.
ClusterGraphChecker 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 ClusterGraphChecker.
#include < AGD/ClusterGraphChecker.h >
Creation
ClusterGraphChecker | C(GraphChecker& GC) | creates an instance C of type ClusterGraphChecker. |
Operations
bool | C.check(const ClusterGraph& CG, KeySet& props) | |
returns true iff CG satisfies all properties in props. | ||
bool | C.check(const ClusterGraph& G, KeySet& props, AgdKey& not_satisfied) | |
returns true if CG satisfies all properties in props, otherwise false is returned and not_satsified is a property in props that is not satisfied by CG. | ||
KeySet | C.get_properties(const ClusterGraph& CG, KeySet& props) | |
returns the set of all properties in props which are satisfied by CG. | ||
list_item | C.add_checker(check_clustergraph_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