ROSE 0.11.145.192
|
Functor called for each common subgraph isomorphism solution.
This functor is called whenever a solution is found for the common subgraph isomorphism problem. Users routinely write their own solution handler. This one serves only as an example and prints the solution vectors to standard output.
A solution processor takes two graph arguments and two vectors of vertex IDs, one for each graph. The vectors are parallel: x
[i] in g1
is isomorphic to y
[i] in g2
for all i
.
A solution processor returns a code that indicates whether the algorithm should search for additional solutions or return to its caller. Throwing an exception from the solution processor is another valid way to return from the algorithm, although it may be slower than returning the abort code.
Definition at line 495 of file GraphAlgorithm.h.
#include <Sawyer/GraphAlgorithm.h>
Public Member Functions | |
CsiNextAction | operator() (const GraphA &, const std::vector< size_t > &x, const GraphB &, const std::vector< size_t > &y) |
Functor. | |
|
inline |
Definition at line 498 of file GraphAlgorithm.h.
|
inline |
Functor.
The vector x
contains vertex IDs from graph g1
, and y
contains IDs from g2
. Both vectors will always be the same length. This implementation prints the vectors w
and y
to standard output. See the class definition for more information.
Definition at line 505 of file GraphAlgorithm.h.
References Sawyer::Container::Algorithm::CSI_CONTINUE.