22 #ifndef mia_core_ICAANALYSISBASE_HH 23 #define mia_core_ICAANALYSISBASE_HH 27 #include <boost/concept/requires.hpp> 28 #include <boost/concept_check.hpp> 49 typedef std::unique_ptr<CICAAnalysis>
Pointer;
63 template <
class Iterator>
64 BOOST_CONCEPT_REQUIRES(((::boost::ForwardIterator<Iterator>)),
66 set_row(
unsigned row, Iterator begin, Iterator end);
69 virtual void initialize(
unsigned int series_length,
unsigned int slice_size) = 0;
76 virtual bool run(
unsigned int nica, std::vector<std::vector<float> > guess) = 0;
79 virtual std::vector<float> get_feature_row(
unsigned int row)
const = 0;
82 virtual std::vector<float> get_mix_series(
unsigned int row)
const = 0;
85 virtual std::vector<float> get_mix(
unsigned int idx)
const = 0;
93 virtual std::vector<float> get_incomplete_mix(
unsigned int idx,
const IndexSet& skip)
const = 0;
101 virtual std::vector<float> get_partial_mix(
unsigned int idx,
const IndexSet& use)
const = 0;
108 virtual std::vector<float> get_delta_feature(
const IndexSet& plus,
const IndexSet& minus)
const = 0;
115 virtual void set_mixing_series(
unsigned int index,
const std::vector<float>& series) = 0;
126 virtual void normalize_ICs() = 0;
133 virtual std::vector<float> normalize_Mix() = 0;
137 virtual unsigned int get_ncomponents()
const = 0;
143 virtual void set_max_iterations(
int n) = 0;
149 virtual void set_approach(
EApproach approach) = 0;
151 virtual void set_row_internal(
unsigned row,
const std::vector<double>& buffer,
double mean) = 0;
161 virtual PICAAnalysis create()
const = 0;
168 template <
class Iterator>
169 BOOST_CONCEPT_REQUIRES(((::boost::ForwardIterator<Iterator>)),
173 const unsigned int length = std::distance(begin, end);
174 std::vector<double> buffer(length);
175 unsigned int idx = 0;
179 mean += (buffer[idx++] = *begin++);
181 for(
unsigned int i = 0; i < length; ++i)
183 set_row_internal(row, buffer, mean);
189 #endif // CICAANALYSISBASE_HH
std::shared_ptr< CICAAnalysisFactory > PICAAnalysisFactory
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
CICAAnalysis::Pointer PICAAnalysis
std::vector< std::vector< float > > CSlopeColumns
class to store the ICA weight matrix
std::set< unsigned int > IndexSet
defines a set of indices used for mixing
void set_row(unsigned row, Iterator begin, Iterator end)
std::unique_ptr< CICAAnalysis > Pointer