ROSE 0.11.145.147
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 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.
 

Constructor & Destructor Documentation

◆ CsiShowSolution()

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

Definition at line 498 of file GraphAlgorithm.h.

Member Function Documentation

◆ operator()()

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

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


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