70 template <
typename GUM_SCALAR >
86 GSpan(
const PRM< GUM_SCALAR >& prm,
87 const PRMSystem< GUM_SCALAR >& sys,
88 gspan::SearchStrategy< GUM_SCALAR >* strategy = 0);
118 gspan::DFSTree< GUM_SCALAR >&
tree();
124 const gspan::DFSTree< GUM_SCALAR >&
tree()
const;
136 const gspan::InterfaceGraph< GUM_SCALAR >&
interfaceGraph()
const;
159 std::vector< gspan::Pattern* >&
patterns();
167 const std::vector< gspan::Pattern* >&
patterns()
const;
355 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS GSpan * gspan
A pointer over an instance of the GSpan class using this class.
bool __isEdgeEligible(typename gspan::EdgeData< GUM_SCALAR > *e)
Returns true if e is an eligible root edge.
std::vector< gspan::LabelData *> __nodes
The vector of nodes in __graph, in decreasing order of interest.
Set< Sequence< PRMInstance< GUM_SCALAR > *> *> MatchedInstances
Code alias.
Inner class to handle data about labels in this interface graph.
HashTable< gspan::LabelData *, Idx > __cost
Mapping between labels and their cost.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
LabelSort(GSpan *my_gspan)
Default constructor.
Size __depth_stop
The max depth allowed for the DSF tree.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Inner class to handle data about edges in __graph.
void __subgraph_mining(gspan::InterfaceGraph< GUM_SCALAR > &graph, gspan::Pattern &p)
Discovers new patterns by developing p.
This class represent the interface graph of a given gum::prm::PRMSystem<GUM_SCALAR>.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void __sortPatterns()
Sort the patterns and compute their respective costs.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The class for generic Hash Tables.
Set< PRMInstance< GUM_SCALAR > *> __chosen
Contains all instance which belongs to a discovered and used pattern.
Representation of a setA Set is a structure that contains arbitrary elements.
gspan::DFSTree< GUM_SCALAR > __tree
The DFSTree used to discover new patters.
A DFSTree is used by gspan to sort lexicographically patterns discovered in an interface graph...
std::vector< gspan::Pattern *> __patterns
The vector of discovered patters, in decreasing order of interest.
gspan::InterfaceGraph< GUM_SCALAR > * __graph
The interface graph used by this class.
Private class used to sort LabelData using STL sort algorithms.
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
gspan::DFSTree< GUM_SCALAR > & tree()
Returns the DFSTree used to discover new patters.
gspan::InterfaceGraph< GUM_SCALAR > & interfaceGraph()
Returns the InterfaceGraph used by this.
void discoverPatterns()
This will methods will discover repeated patterns in the PRMSystem<GUM_SCALAR> assigned to this class...
This class discovers pattern in a PRM<GUM_SCALAR>'s PRMSystem<GUM_SCALAR> to speed up structured infe...
std::vector< gspan::Pattern *> & patterns()
Returns the Pattern mined by this class in a decreasing order of interest.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void setMaxDFSDepth(Size depth)
Defines the maximal depth of the DFSTree used by this class to discover new patterns.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void __sortNodesAndEdges()
Sort the nodes and edges of __graph.
GSpan(const PRM< GUM_SCALAR > &prm, const PRMSystem< GUM_SCALAR > &sys, gspan::SearchStrategy< GUM_SCALAR > *strategy=0)
Default constructor.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
std::vector< gspan::LabelData *> __edges
The vector of edges in __graph, in decreasing order of interest.
Private class used to sort Pattern using STL sort algorithms.
Size getMaxDFSDepth() const
Returns the maximal depth of the DFSTree used to discover new patterns.
MatchedInstances & matches(const gspan::Pattern &p)
Returns a mapping between patterns and the sequence of instance in the interface graph matching them...
This contains all the information we want for a node in a DFSTree.
Size __cost_func(Size interface_size, Size frequency)
Returns the cost with respect to an interface size and its frequency. TODO replace this by a class to...
bool operator()(gspan::LabelData *i, gspan::LabelData *j)
Returns true if i's cost is lesser than j's.
HashTable< gspan::Pattern *, MatchedInstances *> __matched_instances
Mapping between a pattern and the multiset of instances matched to it.