abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
Vf2Wizard< TR > Class Template Reference

#include <lemon/vf2.h>

Public Member Functions

 Vf2Wizard (const Graph1 &g1, const Graph2 &g2)
 Constructor.
 Vf2Wizard (const Base &b)
 Copy constructor.
 Vf2Wizard (const Vf2Wizard &b)
 Copy constructor.
template< class T >
Vf2Wizard< SetMappingBase< T > > mapping (const T &t)
 Named parameter for setting the mapping.
template< class T >
Vf2Wizard< SetNodeEqBase< T > > nodeEq (const T &node_eq)
 Named parameter for setting the node equivalence relation.
template< class M1 , class M2 >
Vf2Wizard< SetNodeEqBase< bits::vf2::MapEq< M1 , M2 > > > nodeLabels (const M1 &m1, const M2 &m2)
 Named parameter for setting the node labels.
Vf2Wizard< Base > & mappingType (MappingType m_type)
 Named parameter for setting the mapping type.
Vf2Wizard< Base > & induced ()
 Named parameter for setting the mapping type to INDUCED.
Vf2Wizard< Base > & iso ()
 Named parameter for setting the mapping type to ISOMORPH.
bool run ()
 Runs VF2 algorithm.
Vf2< Graph1 , Graph2 , Mapping , NodeEq > * getPtrToVf2Object ()
 Get a pointer to the generated Vf2 object.
int count ()
 Counts the number of mappings.

Detailed Description

template< class TR >
class lemon::Vf2Wizard< TR >

Auxiliary class for the function-type interface of VF2 algorithm.

This auxiliary class implements the named parameters of function-type interface of Vf2 algorithm.

Warning
This class is not to be used directly.
Template Parameters
TRThe traits class that defines various types used by the algorithm.

Member Function Documentation

◆ mapping()

template< class TR >
template< class T >
Vf2Wizard< SetMappingBase< T > > mapping ( const T & t)
inline

Named parameter function for setting the map that stores the found embedding.

◆ nodeEq()

template< class TR >
template< class T >
Vf2Wizard< SetNodeEqBase< T > > nodeEq ( const T & node_eq)
inline

Named parameter function for setting the equivalence relation between the nodes.

Parameters
node_eqA bool-valued binary functor determinining whether a node is mappable to another. By default it is an always true operator.

◆ nodeLabels()

template< class TR >
template< class M1 , class M2 >
Vf2Wizard< SetNodeEqBase< bits::vf2::MapEq< M1 , M2 > > > nodeLabels ( const M1 & m1,
const M2 & m2 )
inline

Named parameter function for setting the node labels defining equivalence relation between them.

Parameters
m1An arbitrary readable node map of g1.
m2An arbitrary readable node map of g2.

The value type of these maps must be equal comparable.

◆ mappingType()

template< class TR >
Vf2Wizard< Base > & mappingType ( MappingType m_type)
inline

Named parameter for setting the mapping type.

The mapping type is set to SUBGRAPH by default.

See also
See MappingType for the possible values.

◆ induced()

template< class TR >
Vf2Wizard< Base > & induced ( )
inline

Named parameter for setting the mapping type to INDUCED.

◆ iso()

template< class TR >
Vf2Wizard< Base > & iso ( )
inline

Named parameter for setting the mapping type to ISOMORPH.

◆ run()

template< class TR >
bool run ( )
inline

This method runs VF2 algorithm.

Return values
trueif a mapping is found.
falseif there is no mapping.

◆ getPtrToVf2Object()

template< class TR >
Vf2< Graph1 , Graph2 , Mapping , NodeEq > * getPtrToVf2Object ( )
inline

Gives a pointer to the generated Vf2 object.

Returns
Pointer to the generated Vf2 object.
Warning
Don't forget to delete the referred Vf2 object after use.

◆ count()

template< class TR >
int count ( )
inline

This method counts the number of mappings.

Returns
The number of mappings.