Vf2Wizard

Declared in lemon/vf2.h, in the group Connectivity and Other Graph Properties; the same class on the Doxygen site.

template< class TR >
class Vf2Wizard : public 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:

TR – The traits class that defines various types used by the algorithm.

Public Functions

inline Vf2Wizard( const Graph1 & g1 , const Graph2 & g2 )

Constructor.

inline Vf2Wizard( const Base & b )

Copy constructor.

inline Vf2Wizard( const Vf2Wizard & b )

Copy constructor.

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

Named parameter for setting the mapping.

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

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

Named parameter for setting the node equivalence relation.

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

Parameters:

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

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

Named parameter for setting the node labels.

Named parameter

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

The value type of these maps must be equal comparable.

Parameters:
inline Vf2Wizard< Base > & mappingType( MappingType m_type )

Named parameter for setting the mapping type.

The mapping type is set to SUBGRAPH by default.

See also

See MappingType for the possible values.

inline Vf2Wizard< Base > & induced()

Named parameter for setting the mapping type to INDUCED.

inline Vf2Wizard< Base > & iso()

Named parameter for setting the mapping type to ISOMORPH.

inline bool run()

Runs VF2 algorithm.

This method runs VF2 algorithm.

Return values:
  • true – if a mapping is found.

  • false – if there is no mapping.

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

Get a pointer to the generated Vf2 object.

Gives a pointer to the generated Vf2 object.

Warning

Don’t forget to delete the referred Vf2 object after use.

Returns:

Pointer to the generated Vf2 object.

inline int count()

Counts the number of mappings.

This method counts the number of mappings.

Returns:

The number of mappings.

template< class T >
struct SetMappingBase : public Base

Public Types

typedef T Mapping

Public Functions

inline SetMappingBase( const Base & b )
template< class NE >
struct SetNodeEqBase : public Base

Public Types

typedef NE NodeEq

Public Functions

inline SetNodeEqBase( const Base & b , const NE & node_eq )

Public Members

NodeEq _node_eq