Public Member Functions | List of all members
Sawyer::Container::Algorithm::CsiShowSolution< Graph > Class Template Reference


template<class Graph>
class Sawyer::Container::Algorithm::CsiShowSolution< Graph >

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 355 of file GraphAlgorithm.h.

#include <GraphAlgorithm.h>

Public Member Functions

CsiNextAction operator() (const Graph &g1, const std::vector< size_t > &x, const Graph &g2, const std::vector< size_t > &y)
 Functor. More...

Member Function Documentation

template<class Graph >
CsiNextAction Sawyer::Container::Algorithm::CsiShowSolution< Graph >::operator() ( const Graph g1,
const std::vector< size_t > &  x,
const Graph g2,
const std::vector< size_t > &  y 


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 365 of file GraphAlgorithm.h.

References Sawyer::Container::Algorithm::CSI_CONTINUE.

The documentation for this class was generated from the following file: