22#ifndef mia_core_ICAANALYSISBASE_HH
23#define mia_core_ICAANALYSISBASE_HH
27#include <boost/concept/requires.hpp>
28#include <boost/concept_check.hpp>
50 typedef std::unique_ptr<CIndepCompAnalysis>
Pointer;
64 template <
class Iterator>
65 BOOST_CONCEPT_REQUIRES(((::boost::ForwardIterator<Iterator>)),
67 set_row(
unsigned row, Iterator begin, Iterator end);
70 virtual
void initialize(
unsigned int series_length,
unsigned int slice_size) = 0;
77 virtual
bool run(
unsigned int nica,
std::vector<
std::vector<
float>> guess) = 0;
86 virtual
std::vector<
float>
get_mix(
unsigned int idx)const = 0;
154 virtual
void set_row_internal(
unsigned row, const
std::vector<
double>& buffer,
double mean) = 0;
175 virtual
CIndepCompAnalysis *do_create() const __attribute__((warn_unused_result)) = 0;
176 int m_deterministic_seed;
189template<> const
char *const
208template <
class Iterator>
209BOOST_CONCEPT_REQUIRES(((::boost::ForwardIterator<Iterator>)),
211CIndepCompAnalysis::set_row(
unsigned row, Iterator begin, Iterator end)
213 const unsigned int length = std::distance(begin, end);
214 std::vector<double> buffer(length);
215 unsigned int idx = 0;
219 mean += (buffer[idx++] = *begin++);
223 for (
unsigned int i = 0; i < length; ++i)
226 set_row_internal(row, buffer, mean);
The base class for all plug-in created object.
the Base class for all plugn handlers that deal with factory plugins.
This is tha base of all plugins that create "things", like filters, cost functions time step operator...
the singleton that a plug-in handler really is
static const TFactoryPluginHandler< CIndepCompAnalysisFactoryPlugin > & instance()
The basic template of all plugin handlers.
static const char * data_descr
CIndepCompAnalysisFactory()
CIndepCompAnalysisFactory plugin_data
void set_deterministic_seed(int seed)
virtual ~CIndepCompAnalysisFactory()
CIndepCompAnalysis * create() const __attribute__((warn_unused_result))
CIndepCompAnalysisFactory plugin_type
static const char * type_descr
virtual std::vector< float > normalize_Mix()=0
void set_row(unsigned row, Iterator begin, Iterator end)
virtual void set_approach(EApproach approach)=0
virtual void normalize_ICs()=0
virtual void set_mixing_series(unsigned int index, const std::vector< float > &series)=0
virtual CSlopeColumns get_mixing_curves() const =0
virtual std::vector< float > get_mix(unsigned int idx) const =0
virtual std::vector< float > get_delta_feature(const IndexSet &plus, const IndexSet &minus) const =0
virtual bool run(unsigned int nica, std::vector< std::vector< float > > guess)=0
virtual void set_max_iterations(int n)=0
virtual ~CIndepCompAnalysis()
virtual std::vector< float > get_feature_row(unsigned int row) const =0
virtual std::vector< float > get_incomplete_mix(unsigned int idx, const IndexSet &skip) const =0
std::set< unsigned int > IndexSet
defines a set of indices used for mixing
virtual std::vector< float > get_mix_series(unsigned int row) const =0
virtual unsigned int get_ncomponents() const =0
virtual std::vector< float > get_partial_mix(unsigned int idx, const IndexSet &use) const =0
virtual void set_deterministic_seed(int seed)=0
std::unique_ptr< CIndepCompAnalysis > Pointer
virtual void initialize(unsigned int series_length, unsigned int slice_size)=0
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
std::vector< std::vector< float > > CSlopeColumns
class to store the ICA weight matrix
const char *const TPluginHandler< TFactory< CIndepCompAnalysisFactory > >::m_help
THandlerSingleton< TFactoryPluginHandler< CIndepCompAnalysisFactoryPlugin > > CIndepCompAnalysisFactoryPluginHandler
plugin handler for spaciel filter kernels
TFactory< CIndepCompAnalysisFactory > CIndepCompAnalysisFactoryPlugin
PIndepCompAnalysisFactory produce_ica_factory(const std::string &descr)
CIndepCompAnalysis::Pointer PIndepCompAnalysis
std::shared_ptr< CIndepCompAnalysisFactory > PIndepCompAnalysisFactory