ROSE  0.9.10.6
Public Member Functions | List of all members
Sawyer::Container::Algorithm::CsiShowSolution< GraphA, GraphB > Class Template Reference

Description

template<class GraphA, class GraphB>
class Sawyer::Container::Algorithm::CsiShowSolution< GraphA, GraphB >

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 GraphA &g1, const std::vector< size_t > &x, const GraphB &g2, const std::vector< size_t > &y)
 Functor. More...
 

Member Function Documentation

template<class GraphA , class GraphB >
CsiNextAction Sawyer::Container::Algorithm::CsiShowSolution< GraphA, GraphB >::operator() ( const GraphA &  g1,
const std::vector< size_t > &  x,
const GraphB &  g2,
const std::vector< size_t > &  y 
)
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 365 of file GraphAlgorithm.h.

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


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