Generated on Wed Apr 29 2015 11:51:41 for GGL-4.1.2 by doxygen 1.8.3.1
Data Structures | Public Types | Public Member Functions | Protected Attributes
ggl::DFS_ApplyRule Class Reference

#include <DFS_ApplyRule.hh>

Inheritance diagram for ggl::DFS_ApplyRule:
Inheritance graph
[legend]

Data Structures

class  DFS_ABORTION
 Dummy class to trigger DFS abortion via exception handling. More...
 
class  DFS_Visitor
 

Public Types

typedef std::vector< const
Graph * > 
SearchTrace
 Container that stores a DFS trace. More...
 

Public Member Functions

void add (const Graph &graph)
 
 DFS_ApplyRule ()
 
bool findSolution (const std::vector< Rule > &rules, const Graph &startGraph, Graph_Storage &solutionStorage, DFS_Visitor &visitor, SearchTrace *searchTrace=NULL, const bool doSymmBreak=true, sgm::SubGraphMatching *sgm=NULL)
 
virtual ~DFS_ApplyRule ()
 Destruction. More...
 

Protected Attributes

SearchTrace currentTrace
 the current trace maintained by the current search More...
 
SearchTracefinalTrace
 the final trace to be filled if non-NULL More...
 
std::vector
< sgm::Match_Reporter * > 
reporter
 the match reporter to be informed about each match More...
 
std::vector< const
sgm::Pattern_Interface * > 
rulePattern
 the rule pattern currently applied More...
 
sgm::SubGraphMatchingsgm
 the sub graph matcher currently used More...
 
bool solutionFound
 whether or not a solution was found during this search More...
 
Graph_StoragesolutionStorage
 the solution storage currently used More...
 
DFS_Visitorvisitor
 the DFS visitor currently used More...
 

Detailed Description

Depths-First-Search for graph grammars

   A generic Depths-First-Search (DFS) implementation that performs a
   recursive graph grammar rule application, i.e. it starts a new
   iteration of rule matching and application
   for each reported result graph of the last iteration.

   The recursion end is to be defined by an instance of the RecursionEnd.
Author
Martin Mann (c) 2011 http://www.bioinf.uni-freiburg.de/~mmann/

Definition at line 29 of file DFS_ApplyRule.hh.

Member Typedef Documentation

typedef std::vector< const Graph* > ggl::DFS_ApplyRule::SearchTrace

Definition at line 63 of file DFS_ApplyRule.hh.

Constructor & Destructor Documentation

ggl::DFS_ApplyRule::DFS_ApplyRule ( )

Construction

virtual ggl::DFS_ApplyRule::~DFS_ApplyRule ( )
virtual

Member Function Documentation

void ggl::DFS_ApplyRule::add ( const Graph graph)
virtual

The Graph_Storage interface is used to trigger a new DFS iteration. Thus, each added graph is checked if the DFS is to be aborted or not. In case the search is to be extended, another rule application iteration is started.

Parameters
graphthe graph that might start another DFS iteration or is either a solution or DFS dead end.

Implements ggl::Graph_Storage.

bool ggl::DFS_ApplyRule::findSolution ( const std::vector< Rule > &  rules,
const Graph startGraph,
Graph_Storage solutionStorage,
DFS_Visitor visitor,
SearchTrace searchTrace = NULL,
const bool  doSymmBreak = true,
sgm::SubGraphMatching sgm = NULL 
)

Performs a DFS when applying the given rule onto the defined start graph.

Parameters
rulesthe rules to apply
startGraphthe start graph for the DFS
solutionStoragethe container where to report the solution to
visitorthe visitor instance that guides the DFS. Each result graph is checked with the visitor to decide if a solution was found, a trace back is needed or further DFS is to be done.
searchTraceif non-NULL, DFS will copy the trace of the DFS search to the container, i.e. the sequence of graphs generated along the search
doSymmBreakwhether or not symmetry breaking should be done
sgmthe sub graph matcher to be used; if NULL an sgm::SGM_vf2 object is used per default
Returns
whether or not a solution was found

Field Documentation

SearchTrace ggl::DFS_ApplyRule::currentTrace
protected

Definition at line 134 of file DFS_ApplyRule.hh.

SearchTrace* ggl::DFS_ApplyRule::finalTrace
protected

Definition at line 132 of file DFS_ApplyRule.hh.

std::vector< sgm::Match_Reporter * > ggl::DFS_ApplyRule::reporter
protected

Definition at line 130 of file DFS_ApplyRule.hh.

std::vector< const sgm::Pattern_Interface * > ggl::DFS_ApplyRule::rulePattern
protected

Definition at line 122 of file DFS_ApplyRule.hh.

sgm::SubGraphMatching* ggl::DFS_ApplyRule::sgm
protected

Definition at line 128 of file DFS_ApplyRule.hh.

bool ggl::DFS_ApplyRule::solutionFound
protected

Definition at line 136 of file DFS_ApplyRule.hh.

Graph_Storage* ggl::DFS_ApplyRule::solutionStorage
protected

Definition at line 124 of file DFS_ApplyRule.hh.

DFS_Visitor* ggl::DFS_ApplyRule::visitor
protected

Definition at line 126 of file DFS_ApplyRule.hh.


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