85 template <
typename GUM_SCALAR >
174 std::vector< gspan::Pattern* >&
patterns();
182 const std::vector< gspan::Pattern* >&
patterns()
const;
369#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Headers of the DFSTree class.
The class for generic Hash Tables.
This class discovers pattern in a PRM<GUM_SCALAR>'s PRMSystem<GUM_SCALAR> to speed up structured infe...
void discoverPatterns()
This will methods will discover repeated patterns in the PRMSystem<GUM_SCALAR> assigned to this class...
HashTable< gspan::Pattern *, MatchedInstances * > _matched_instances_
Mapping between a pattern and the multiset of instances matched to it.
std::vector< gspan::LabelData * > _nodes_
The vector of nodes in graph, in decreasing order of interest.
std::vector< gspan::Pattern * > _patterns_
The vector of discovered patters, in decreasing order of interest.
HashTable< gspan::LabelData *, Idx > _cost_
Mapping between labels and their cost.
MatchedInstances & matches(const gspan::Pattern &p)
Returns a mapping between patterns and the sequence of instance in the interface graph matching them.
std::vector< gspan::Pattern * > & patterns()
Returns the Pattern mined by this class in a decreasing order of interest.
gspan::InterfaceGraph< GUM_SCALAR > * _graph_
The interface graph used by this class.
void setMaxDFSDepth(Size depth)
Defines the maximal depth of the DFSTree used by this class to discover new patterns.
gspan::DFSTree< GUM_SCALAR > _tree_
The DFSTree used to discover new patters.
Set< PRMInstance< GUM_SCALAR > * > _chosen_
Contains all instance which belongs to a discovered and used pattern.
void _subgraph_mining_(gspan::InterfaceGraph< GUM_SCALAR > &graph, gspan::Pattern &p)
Discovers new patterns by developing p.
std::vector< gspan::LabelData * > _edges_
The vector of edges in graph, in decreasing order of interest.
GSpan(const PRM< GUM_SCALAR > &prm, const PRMSystem< GUM_SCALAR > &sys, gspan::SearchStrategy< GUM_SCALAR > *strategy=0)
Default constructor.
Size getMaxDFSDepth() const
Returns the maximal depth of the DFSTree used to discover new patterns.
gspan::DFSTree< GUM_SCALAR > & tree()
Returns the DFSTree used to discover new patters.
gspan::InterfaceGraph< GUM_SCALAR > & interfaceGraph()
Returns the InterfaceGraph used by this.
Set< Sequence< PRMInstance< GUM_SCALAR > * > * > MatchedInstances
Code alias.
bool _isEdgeEligible_(typename gspan::EdgeData< GUM_SCALAR > *e)
Returns true if e is an eligible root edge.
Size _depth_stop_
The max depth allowed for the DSF tree.
void _sortNodesAndEdges_()
Sort the nodes and edges of graph.
Size _cost_func_(Size interface_size, Size frequency)
Returns the cost with respect to an interface size and its frequency.
void _sortPatterns_()
Sort the patterns and compute their respective costs.
A PRMSystem is a container of PRMInstance and describe a relational skeleton.
This class represents a Probabilistic Relational PRMSystem<GUM_SCALAR>.
A DFSTree is used by gspan to sort lexicographically patterns discovered in an interface graph.
Inner class to handle data about edges in graph.
This class represent the interface graph of a given gum::prm::PRMSystem<GUM_SCALAR>.
This contains all the information we want for a node in a DFSTree.
This is an abstract class used to tune search strategies in the gspan algorithm.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Inline implementation of gspan.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities
LabelSort(GSpan *my_gspan)
Default constructor.
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
bool operator()(gspan::LabelData *i, gspan::LabelData *j)
Returns true if i's cost is lesser than j's.
bool operator()(gspan::Pattern *i, gspan::Pattern *j)
Returns true if i's cost is lesser than j's.
~PatternSort()
Destructor.
GSpan * gspan
A pointer over an instance of the GSpan class using this class.
PatternSort(GSpan *my_gspan)
Default constructor.
Inner class to handle data about labels in this interface graph.
Class used to compute response times for benchmark purposes.
Implementation of a variable elimination algorithm for inference in Bayesian networks.