30 #ifndef GUM_DFS_TREE_H 31 #define GUM_DFS_TREE_H 56 template <
typename GUM_SCALAR >
60 template <
typename GUM_SCALAR >
70 template <
typename GUM_SCALAR >
118 std::list< NodeId >&
roots();
121 const std::list< NodeId >&
roots()
const;
306 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
PatternData(Pattern *p)
Constructor.
const InterfaceGraph< GUM_SCALAR > * __graph
The interface graph on which this DFSTree applies.
This class is used to define an edge growth of a pattern in this DFSTree.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
SearchStrategy< GUM_SCALAR > * __strategy
The strategy used to prune the search tree.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void __addChild(Pattern &p, Pattern *child, EdgeGrowth< GUM_SCALAR > &edge_growth)
Add a child to this DFSTree.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Inner class to handle data about labels in this interface graph.
Pattern * pattern
The pattern.
An PRMInstance is a Bayesian Network fragment defined by a Class and used in a PRMSystem.
The generic class for storing (ordered) sequences of objects.
Pattern & growPattern(Pattern &p, EdgeGrowth< GUM_SCALAR > &edge_growth, Size min_freq)
Add a one edge growth of p as one of its child.
Abstract class representing an element of PRM class.
std::list< NodeId > __roots
The list of root patterns in this DFSTree.
UndiGraph & g
The isomorphism graph.
Inner class to handle data about edges in __graph.
This is used to generate the max_indep_set of a Pattern.
This class represent the interface graph of a given gum::prm::PRMSystem<GUM_SCALAR>.
void addRoot(LabelData &data)
Add a one edge Pattern in this DFSTree.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
bool __is_new_seq(Sequence< PRMInstance< GUM_SCALAR > * > &seq, NodeProperty< Sequence< PRMInstance< GUM_SCALAR > * > * > &iso_map)
Check if an instance match is redundant.
The class for generic Hash Tables.
std::list< NodeId > & roots()
Returns the list of root patterns in this DFSTree.
const InterfaceGraph< GUM_SCALAR > & graph() const
Returns the list of root patterns in this DFSTree.
A DFSTree is used by gspan to sort lexicographically patterns discovered in an interface graph...
~PatternData()
Destructor.
Size cost
The cost of this Pattern.
Base class for all oriented graphs.
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.
Set< NodeId > max_indep_set
The maximal independent set of p.
Set of pairs of elements with fast search for both elements.
NodeProperty< Sequence< PRMInstance< GUM_SCALAR > *> *> iso_map
The instances matching p in the interface graph.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
SearchStrategy< GUM_SCALAR > & strategy()
strategy getter
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
This class discovers pattern in a PRM<GUM_SCALAR>'s PRMSystem<GUM_SCALAR> to speed up structured infe...
void __initialiaze_root(Pattern *p, Sequence< EdgeData< GUM_SCALAR > * > &seq)
This initialize the DSFTree with a new root.
Base class for undirected graphs.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size gain
The gain of this Pattern.
PatternData & data(const Pattern &p)
HashTable< Pattern *, PatternData *> __data
Data about patterns in this DFSTree.
double frequency(const Pattern &p) const
Returns the frequency of p respecting it's maximal independent set.
bool __test_equality(HashTable< PRMClassElement< GUM_SCALAR > *, Size > &x, HashTable< PRMClassElement< GUM_SCALAR > *, Size > &y)
void __checkGrowth(Pattern &p, Pattern *child, EdgeGrowth< GUM_SCALAR > &edge_growth)
Raise different exceptions if child is invalid or illegal.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Pattern & parent(const Pattern &p)
Returns the parent of p in this DFSTree.
UndiGraph iso_graph
The isomorphism graph of the pattern.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Bijection< NodeId, Pattern *> __node_map
The mapping between nodes in this DFSTree and the patterns they represents.
std::list< NodeId > children
The list of the pattern's children, sorted lexicographically.
This contains all the information we want for a node in a DFSTree.
DFSTree(const InterfaceGraph< GUM_SCALAR > &graph, SearchStrategy< GUM_SCALAR > *strategy=0)
Default constructor.
This is an abstract class used to tune search strategies in the gspan algorithm.
Size NodeId
Type for node ids.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.