![]() |
aGrUM
0.16.0
|
<agrum/PRM/generator/clusteredLayerGenerator.h> More...
#include <clusteredLayerGenerator.h>
Public Member Functions | |
Constructors and destructor. | |
ClusteredLayerGenerator () | |
Default constructor. More... | |
ClusteredLayerGenerator (const ClusteredLayerGenerator &source) | |
Copy constructor. More... | |
ClusteredLayerGenerator & | operator= (const ClusteredLayerGenerator &source) |
Copy operator. More... | |
virtual | ~ClusteredLayerGenerator () |
Destructor. More... | |
Size | getDomainSize () const |
Getters and setters. More... | |
void | setDomainSize (Size s) |
Set the domain size of generated types. More... | |
Size | getMaxParents () const |
Returns the max number of parents allowed for any attribute or aggregator. More... | |
void | setMaxParents (Size s) |
Returns the max number of parents allowed for any attribute or aggregator. More... | |
double | getClusterRatio () const |
Returns the odds of a given class to be replaced by a cluster. More... | |
void | setClusterRatio (double ratio) |
Define the odds of a given class to be replaced by a cluster. More... | |
void | setLayers (const std::vector< typename LayerGenerator< GUM_SCALAR >::LayerData > &v) |
Defines the structure of each layers. More... | |
std::vector< typename LayerGenerator< GUM_SCALAR >::LayerData > & | getLayer () |
Getters and setters. More... | |
const std::vector< typename LayerGenerator< GUM_SCALAR >::LayerData > & | getLayer () const |
Getters and setters. More... | |
virtual PRM< GUM_SCALAR > * | generate () |
Proceeds with the generation of the PRM<GUM_SCALAR>. More... | |
void | setNameGenerator (const NameGenerator &name_gen) |
Getters and setters. More... | |
const NameGenerator & | getNameGenerator () const |
Returns the NameGenerator used by this generator. More... | |
Protected Attributes | |
NameGenerator | _name_gen |
The name generator used by this class. More... | |
Classes | |
struct | MyData |
<agrum/PRM/generator/clusteredLayerGenerator.h>
This class generates PRMs with a clustered layer structure.
Definition at line 57 of file clusteredLayerGenerator.h.
INLINE gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::ClusteredLayerGenerator | ( | ) |
Default constructor.
Definition at line 532 of file clusteredLayerGenerator_tpl.h.
INLINE gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::ClusteredLayerGenerator | ( | const ClusteredLayerGenerator< GUM_SCALAR > & | source | ) |
Copy constructor.
Definition at line 539 of file clusteredLayerGenerator_tpl.h.
|
virtual |
Destructor.
Definition at line 547 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::operator=().
|
private |
Definition at line 322 of file clusteredLayerGenerator_tpl.h.
References gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), gum::prm::PRMFactory< GUM_SCALAR >::addParent(), gum::prm::PRMFactory< GUM_SCALAR >::addReferenceSlot(), gum::prm::PRMObject::CLASS, gum::prm::PRMFactory< GUM_SCALAR >::endAttribute(), gum::prm::PRMFactory< GUM_SCALAR >::endClass(), gum::BijectionImplementation< T1, T2, Alloc, Gen >::first(), gum::ArcGraphPart::parents(), gum::prm::PRMFactory< GUM_SCALAR >::retrieveClass(), gum::BijectionImplementation< T1, T2, Alloc, Gen >::second(), gum::prm::PRMFactory< GUM_SCALAR >::setRawCPFByLines(), gum::prm::PRMFactory< GUM_SCALAR >::startAttribute(), and gum::prm::PRMFactory< GUM_SCALAR >::startClass().
|
private |
Definition at line 384 of file clusteredLayerGenerator_tpl.h.
References gum::DAG::addArc(), gum::NodeGraphPart::addNode(), gum::ArcGraphPart::eraseArc(), gum::ArcGraphPart::existsArc(), gum::BijectionImplementation< T1, T2, Alloc, Gen >::insert(), gum::NodeGraphPart::nodes(), gum::ArcGraphPart::parents(), gum::BijectionImplementation< T1, T2, Alloc, Gen >::second(), and gum::Set< Key, Alloc >::size().
|
private |
Definition at line 97 of file clusteredLayerGenerator_tpl.h.
References gum::Set< Key, Alloc >::insert().
|
private |
Definition at line 119 of file clusteredLayerGenerator_tpl.h.
References gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), gum::prm::PRMFactory< GUM_SCALAR >::addParent(), gum::prm::PRMFactory< GUM_SCALAR >::addReferenceSlot(), gum::prm::PRMObject::CLASS, gum::prm::PRMObject::CLASS_ELT, gum::prm::PRMFactory< GUM_SCALAR >::endAttribute(), gum::prm::PRMFactory< GUM_SCALAR >::endClass(), gum::BijectionImplementation< T1, T2, Alloc, Gen >::first(), GUM_ERROR, gum::ArcGraphPart::parents(), gum::prm::PRMFactory< GUM_SCALAR >::retrieveClass(), gum::BijectionImplementation< T1, T2, Alloc, Gen >::second(), gum::prm::PRMFactory< GUM_SCALAR >::setRawCPFByLines(), gum::prm::PRMFactory< GUM_SCALAR >::startAttribute(), and gum::prm::PRMFactory< GUM_SCALAR >::startClass().
|
private |
Definition at line 66 of file clusteredLayerGenerator_tpl.h.
References gum::prm::PRMFactory< GUM_SCALAR >::addAttribute(), gum::prm::PRMFactory< GUM_SCALAR >::addReferenceSlot(), gum::prm::PRMObject::CLASS_ELT, gum::prm::PRMFactory< GUM_SCALAR >::endInterface(), gum::prm::PRMObject::PRM_INTERFACE, and gum::prm::PRMFactory< GUM_SCALAR >::startInterface().
|
private |
Definition at line 440 of file clusteredLayerGenerator_tpl.h.
References gum::prm::PRMFactory< GUM_SCALAR >::addInstance(), gum::prm::PRMFactory< GUM_SCALAR >::endSystem(), GUM_ERROR, gum::prm::PRMObject::INSTANCE, gum::prm::PRMFactory< GUM_SCALAR >::setReferenceSlot(), gum::prm::PRMFactory< GUM_SCALAR >::startSystem(), and gum::prm::PRMObject::SYSTEM.
|
private |
Definition at line 50 of file clusteredLayerGenerator_tpl.h.
References gum::prm::PRMFactory< GUM_SCALAR >::addLabel(), gum::prm::PRMFactory< GUM_SCALAR >::endDiscreteType(), gum::prm::PRMFactory< GUM_SCALAR >::startDiscreteType(), and gum::prm::PRMObject::TYPE.
|
virtual |
Proceeds with the generation of the PRM<GUM_SCALAR>.
Implements gum::prm::PRMGenerator< GUM_SCALAR >.
Definition at line 34 of file clusteredLayerGenerator_tpl.h.
References GUM_ERROR, and gum::prm::PRMFactory< GUM_SCALAR >::prm().
INLINE double gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::getClusterRatio | ( | ) | const |
Returns the odds of a given class to be replaced by a cluster.
Definition at line 607 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__cluster_ratio.
INLINE Size gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::getDomainSize | ( | ) | const |
Getters and setters.
Returns the domain size of generated types.
Definition at line 569 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__domain_size.
INLINE std::vector< typename LayerGenerator< GUM_SCALAR >::LayerData > & gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::getLayer | ( | ) |
Getters and setters.
Returns the domain size of generated types.
Definition at line 596 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__layers.
INLINE const std::vector< typename LayerGenerator< GUM_SCALAR >::LayerData > & gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::getLayer | ( | ) | const |
Getters and setters.
Returns the domain size of generated types.
Definition at line 602 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__layers.
INLINE Size gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::getMaxParents | ( | ) | const |
Returns the max number of parents allowed for any attribute or aggregator.
Definition at line 579 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__max_parents.
|
inherited |
Returns the NameGenerator used by this generator.
Definition at line 58 of file PRMGenerator_tpl.h.
References gum::prm::PRMGenerator< GUM_SCALAR >::_name_gen.
INLINE ClusteredLayerGenerator< GUM_SCALAR > & gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::operator= | ( | const ClusteredLayerGenerator< GUM_SCALAR > & | source | ) |
Copy operator.
Definition at line 561 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__domain_size, gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__layers, and gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__max_parents.
Referenced by gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::~ClusteredLayerGenerator().
INLINE void gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::setClusterRatio | ( | double | ratio | ) |
Define the odds of a given class to be replaced by a cluster.
Definition at line 613 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__cluster_ratio.
INLINE void gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::setDomainSize | ( | Size | s | ) |
Set the domain size of generated types.
Definition at line 574 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__domain_size.
INLINE void gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::setLayers | ( | const std::vector< typename LayerGenerator< GUM_SCALAR >::LayerData > & | v | ) |
Defines the structure of each layers.
Each value in v defines a layer, were v[i].first is the number of different classes in the i-th layer and v[i].second is the number of instances in the i-th layer.
v | A vector describing each layer. |
Definition at line 589 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__layers.
INLINE void gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::setMaxParents | ( | Size | s | ) |
Returns the max number of parents allowed for any attribute or aggregator.
Definition at line 584 of file clusteredLayerGenerator_tpl.h.
References gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::__max_parents.
|
inherited |
Getters and setters.
Defines the NameGenerator used by this generator.
Definition at line 51 of file PRMGenerator_tpl.h.
References gum::prm::PRMGenerator< GUM_SCALAR >::_name_gen.
|
private |
Definition at line 122 of file clusteredLayerGenerator.h.
|
private |
Definition at line 121 of file clusteredLayerGenerator.h.
Referenced by gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::getClusterRatio(), and gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::setClusterRatio().
|
private |
|
private |
Definition at line 118 of file clusteredLayerGenerator.h.
Referenced by gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::getLayer(), gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::operator=(), and gum::prm::ClusteredLayerGenerator< GUM_SCALAR >::setLayers().
|
private |
|
protectedinherited |
The name generator used by this class.
Definition at line 81 of file PRMGenerator.h.
Referenced by gum::prm::PRMGenerator< GUM_SCALAR >::getNameGenerator(), and gum::prm::PRMGenerator< GUM_SCALAR >::setNameGenerator().