36#ifndef STK_CATEGORICALMIXTUREMANAGER_H
37#define STK_CATEGORICALMIXTUREMANAGER_H
39#include "../STK_Clust_Util.h"
40#include "../STK_IMixtureManager.h"
43#define STK_CREATE_MIXTURE(Data, Bridge) \
44 Data* p_data = new Data(idData); \
45 p_handler()->getData(idData, p_data->dataij()); \
46 registerDataBridge(p_data); \
47 return new Bridge( &(p_data->dataij()), idData, nbCluster);
52template<
class DataHandler>
class CategoricalMixtureManager;
59template <
class DataHandler_>
92template<
class DataHandler>
217#undef STK_CREATE_MIXTURE
In this file we define the bridge classes between the categorical mixtures and the composer.
#define STK_CREATE_MIXTURE(Data, Bridge)
A mixture manager is a factory class for injection dependency in the STK++ derived class of the IMixt...
hidden::MixtureManagerTraits< CategoricalMixtureManager >::DataBridgeType DataBridgeType
Clust::Mixture getIdModel(String const &idData) const
Utility function allowing to find the idModel from the idData.
void setParametersImpl(IMixture *p_mixture, ArrayXX const ¶m) const
set the parameters to an IMixture.
IMixture * createMixtureImpl(Clust::Mixture idModel, String const &idData, int nbCluster)
create a concrete mixture and initialize it.
void getParametersImpl(IMixture *p_mixture, ArrayXX ¶m) const
get the parameters from an IMixture.
~CategoricalMixtureManager()
destructor
hidden::MixtureManagerTraits< CategoricalMixtureManager >::MissingIndexes MissingIndexes
CategoricalBridge< Clust::Categorical_pjk_, Data > MixtureBridge_pjk
hidden::MixtureManagerTraits< CategoricalMixtureManager >::MissingValues MissingValues
IMixtureManager< CategoricalMixtureManager > Base
hidden::MixtureManagerTraits< CategoricalMixtureManager >::Type Type
hidden::MixtureManagerTraits< CategoricalMixtureManager >::Data Data
CategoricalBridge< Clust::Categorical_pk_, Data > MixtureBridge_pk
CategoricalMixtureManager(DataHandler const &handler)
Default constructor, need an instance of a DataHandler.
IMixture * createMixtureImpl(String const &modelName, String const &idData, int nbCluster)
create a concrete mixture and initialize it.
void getMissingValuesImpl(IMixture *p_mixture, MissingValues &missing) const
get the missing values from an IMixture.
Interface base class for mixture managers.
void getMissingValues(IMixture *p_mixture, MissingValues &missing) const
get the missing values
Clust::Mixture getIdModel(String const &idData) const
Utility function allowing to find the idModel from the idData.
hidden::MixtureManagerTraits< CategoricalMixtureManager< DataHandler > >::DataHandler DataHandler
void registerDataBridge(IDataBridge *p_data)
register a data bridge to the IMixtureManager.
void setParameters(IMixture *p_mixture, ArrayXX const &data) const
set the parameters from an IMixture.
DataHandler const *const p_handler() const
IDataBridge * getDataBridge(String const &idData) const
Utility lookup function allowing to find a DataBridge from its idData.
void getParameters(IMixture *p_mixture, ArrayXX &data) const
get the parameters from an IMixture.
Interface base class for all the mixture models that will be processed by the composer.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
Mixture stringToMixture(String const &type)
Convert a String to a Mixture.
Mixture
list of the mixtures that can be used by the composer
std::basic_string< Char > String
STK fundamental type of a String.
The namespace STK is the main domain space of the Statistical ToolKit project.
The DataHandlerTraits will give the type of container furnished by the concrete implementations of th...
DataHandler_ DataHandler
type of data
std::vector< std::pair< int, int > > MissingIndexes
Type of the array storing missing values indexes.
DataBridge< Data > DataBridgeType
class wrapping the data set
DataHandlerTraits< DataHandler, Type >::Data Data
type of the data set
std::vector< std::pair< std::pair< int, int >, Type > > MissingValues
Type of the array storing missing values.
Main class for the mixture managers traits policy.