![]() |
aGrUM
0.16.0
|
This is class is an implementation of a strict strategy for the GSpan algorithm. More...
#include <agrum/PRM/gspan/DFSTree.h>
Public Member Functions | |
Constructor and destructor. | |
StrictSearch (Size freq=2) | |
Default constructor. More... | |
StrictSearch (const StrictSearch &from) | |
Copy constructor. More... | |
virtual | ~StrictSearch () |
Destructor. More... | |
StrictSearch & | operator= (const StrictSearch &from) |
Copy operator. More... | |
Search methods. | |
virtual bool | accept_root (const Pattern *r) |
virtual bool | accept_growth (const Pattern *parent, const Pattern *child, const EdgeGrowth< GUM_SCALAR > &growth) |
virtual bool | operator() (LabelData *i, LabelData *j) |
virtual bool | operator() (Pattern *i, Pattern *j) |
Search methods. | |
void | setTree (DFSTree< GUM_SCALAR > *tree) |
Protected Attributes | |
DFSTree< GUM_SCALAR > * | _tree |
Protected Member Functions | |
double | _computeCost (const Pattern &p) |
Classes | |
struct | PData |
Private structure to represent data about a pattern. More... | |
This is class is an implementation of a strict strategy for the GSpan algorithm.
This will force early cuts in the DFSTree and should help not spending much time searching for new patterns.
A new growth is accepted if it is at least better than its predecessor.
Definition at line 176 of file searchStrategy.h.
|
explicit |
Default constructor.
Definition at line 296 of file searchStrategy_tpl.h.
INLINE gum::prm::gspan::StrictSearch< GUM_SCALAR >::StrictSearch | ( | const StrictSearch< GUM_SCALAR > & | from | ) |
Copy constructor.
Definition at line 302 of file searchStrategy_tpl.h.
|
virtual |
Destructor.
Definition at line 310 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::operator=().
|
private |
Definition at line 65 of file searchStrategy_tpl.h.
References gum::UndiGraph::addEdge(), gum::NodeGraphPart::addNode(), gum::BijectionImplementation< T1, T2, Alloc, Gen >::first(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::graph, gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::inners, gum::Set< Key, Alloc >::insert(), gum::BijectionImplementation< T1, T2, Alloc, Gen >::insert(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::mod, gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::node2attr, gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::outputs, and gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::vars.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__compute_costs().
|
private |
Definition at line 392 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__buildPatternGraph(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::__elimination_cost(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::__map, gum::prm::gspan::SearchStrategy< GUM_SCALAR >::_computeCost(), and gum::prm::gspan::SearchStrategy< GUM_SCALAR >::_tree.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__inner_cost(), and gum::prm::gspan::StrictSearch< GUM_SCALAR >::__outer_cost().
|
private |
Definition at line 153 of file searchStrategy_tpl.h.
References gum::MultiDimDecorator< GUM_SCALAR >::add(), gum::MultiDimDecorator< GUM_SCALAR >::domainSize(), gum::StaticTriangulation::eliminationOrder(), gum::MultiDimDecorator< GUM_SCALAR >::erase(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::graph, gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::inners, gum::Set< Key, Alloc >::insert(), gum::List< Val, Alloc >::insert(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::mod, gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::outputs, gum::Set< Key, Alloc >::size(), and gum::prm::gspan::StrictSearch< GUM_SCALAR >::PData::vars.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__compute_costs().
|
private |
Definition at line 351 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__compute_costs(), and gum::prm::gspan::StrictSearch< GUM_SCALAR >::__map.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::accept_growth(), and gum::prm::gspan::StrictSearch< GUM_SCALAR >::operator()().
|
private |
Definition at line 361 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__compute_costs(), and gum::prm::gspan::StrictSearch< GUM_SCALAR >::__map.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::accept_growth(), and gum::prm::gspan::StrictSearch< GUM_SCALAR >::operator()().
|
private |
Definition at line 371 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__dot, gum::prm::PRMObject::name(), and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
|
private |
Definition at line 378 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__dot, gum::prm::PRMObject::name(), and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
|
private |
Definition at line 385 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__dot, gum::prm::PRMSlotChain< GUM_SCALAR >::lastElt(), and gum::prm::PRMObject::name().
|
protectedinherited |
Definition at line 36 of file searchStrategy_tpl.h.
References gum::SequenceImplementation< Key, Alloc, std::is_scalar< Key >::value >::exists(), and gum::SequenceImplementation< Key, Alloc, std::is_scalar< Key >::value >::insert().
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__compute_costs(), and gum::prm::gspan::TreeWidthSearch< GUM_SCALAR >::cost().
|
virtual |
Implements gum::prm::gspan::SearchStrategy< GUM_SCALAR >.
Definition at line 327 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__inner_cost(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::__outer_cost(), and gum::prm::gspan::SearchStrategy< GUM_SCALAR >::_tree.
|
virtual |
Implements gum::prm::gspan::SearchStrategy< GUM_SCALAR >.
Definition at line 322 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__freq, and gum::prm::gspan::SearchStrategy< GUM_SCALAR >::_tree.
|
virtual |
Implements gum::prm::gspan::SearchStrategy< GUM_SCALAR >.
Definition at line 344 of file searchStrategy_tpl.h.
References gum::prm::gspan::SearchStrategy< GUM_SCALAR >::_tree, and gum::prm::gspan::LabelData::tree_width.
|
virtual |
Implements gum::prm::gspan::SearchStrategy< GUM_SCALAR >.
Definition at line 337 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__inner_cost(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::__outer_cost(), and gum::prm::gspan::SearchStrategy< GUM_SCALAR >::_tree.
INLINE StrictSearch< GUM_SCALAR > & gum::prm::gspan::StrictSearch< GUM_SCALAR >::operator= | ( | const StrictSearch< GUM_SCALAR > & | from | ) |
Copy operator.
Definition at line 316 of file searchStrategy_tpl.h.
References gum::prm::gspan::StrictSearch< GUM_SCALAR >::__freq.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::~StrictSearch().
|
inherited |
Definition at line 233 of file searchStrategy_tpl.h.
References gum::prm::gspan::SearchStrategy< GUM_SCALAR >::_tree.
|
private |
Definition at line 237 of file searchStrategy.h.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__str().
|
private |
Definition at line 212 of file searchStrategy.h.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::accept_root(), and gum::prm::gspan::StrictSearch< GUM_SCALAR >::operator=().
|
private |
Definition at line 216 of file searchStrategy.h.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__compute_costs(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::__inner_cost(), and gum::prm::gspan::StrictSearch< GUM_SCALAR >::__outer_cost().
|
protectedinherited |
Definition at line 112 of file searchStrategy.h.
Referenced by gum::prm::gspan::StrictSearch< GUM_SCALAR >::__compute_costs(), gum::prm::gspan::FrequenceSearch< GUM_SCALAR >::accept_growth(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::accept_growth(), gum::prm::gspan::FrequenceSearch< GUM_SCALAR >::accept_root(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::accept_root(), gum::prm::gspan::FrequenceSearch< GUM_SCALAR >::operator()(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::operator()(), gum::prm::gspan::SearchStrategy< GUM_SCALAR >::operator=(), and gum::prm::gspan::SearchStrategy< GUM_SCALAR >::setTree().