Blame view

src/ExternLib/StatisticFunctions/AMDAPlugin.cc 4.55 KB
74a11471   Benjamin Renard   Add min, max, var...
1
2
3
4
5
6
7
8
9
10
11
// Standard libraries include files
//-----------------------------------------------------------------------------
#include <iostream>

// Include oriented definitions 
//-----------------------------------------------------------------------------

// Module Kernel include files
//-----------------------------------------------------------------------------

#include "ProcessStatisticFunctions.hh"
e8db9c26   Hacene SI HADJ MOHAND   structure ok
12
#include "CorrelationProcess.hh"
74a11471   Benjamin Renard   Add min, max, var...
13
14
15
16
17
18
19
20
21
22
#include "ServicesServer.hh"
#include "PluginManager.hh"

using namespace AMDA::Parameters;

// Other modules include files
//-----------------------------------------------------------------------------

/**
   Retrieve the Plugin version we're going to expect
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
23
24
25
 */
extern "C" const char* getPluginVersion() {
    return "(Version)";
74a11471   Benjamin Renard   Add min, max, var...
26
27
28
29
}

/**
   Tells us to register our functionality to an engine kernel
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
30
 */
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
31
extern "C" void registerPlugin(AMDA::Plugins::PluginManager & pm) {
e8db9c26   Hacene SI HADJ MOHAND   structure ok
32
    std::string pluginPath = pm.getCurrentPluginPath();
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
33
34
    ProcessFactory factProcessMinFunc = boost::factory<ProcessMinFunc*>();
    ServicesServer::getInstance()->addProcessFactory("min", factProcessMinFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
35
    ServicesServer::getInstance()->linkProcessWithPlugin("min", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
36
37
38

    ProcessFactory factProcessMinSmFunc = boost::factory<ProcessMinSmFunc*>();
    ServicesServer::getInstance()->addProcessFactory("min_sm", factProcessMinSmFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
39
    ServicesServer::getInstance()->linkProcessWithPlugin("min_sm", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
40
41
42

    ProcessFactory factProcessMaxFunc = boost::factory<ProcessMaxFunc*>();
    ServicesServer::getInstance()->addProcessFactory("max", factProcessMaxFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
43
    ServicesServer::getInstance()->linkProcessWithPlugin("max", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
44
45
46

    ProcessFactory factProcessMaxSmFunc = boost::factory<ProcessMaxSmFunc*>();
    ServicesServer::getInstance()->addProcessFactory("max_sm", factProcessMaxSmFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
47
    ServicesServer::getInstance()->linkProcessWithPlugin("max_sm", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
48
49
50

    ProcessFactory factProcessVarFunc = boost::factory<ProcessVarFunc*>();
    ServicesServer::getInstance()->addProcessFactory("var", factProcessVarFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
51
    ServicesServer::getInstance()->linkProcessWithPlugin("var", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
52
53
54

    ProcessFactory factProcessVarSmFunc = boost::factory<ProcessVarSmFunc*>();
    ServicesServer::getInstance()->addProcessFactory("var_sm", factProcessVarSmFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
55
    ServicesServer::getInstance()->linkProcessWithPlugin("var_sm", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
56
57
58

    ProcessFactory factProcessRmsFunc = boost::factory<ProcessRmsFunc*>();
    ServicesServer::getInstance()->addProcessFactory("rms", factProcessRmsFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
59
    ServicesServer::getInstance()->linkProcessWithPlugin("rms", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
60
61
62

    ProcessFactory factProcessRmsSmFunc = boost::factory<ProcessRmsSmFunc*>();
    ServicesServer::getInstance()->addProcessFactory("rms_sm", factProcessRmsSmFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
63
    ServicesServer::getInstance()->linkProcessWithPlugin("rms_sm", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
64
65
66

    ProcessFactory factProcessSkewFunc = boost::factory<ProcessSkewFunc*>();
    ServicesServer::getInstance()->addProcessFactory("skew", factProcessSkewFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
67
    ServicesServer::getInstance()->linkProcessWithPlugin("skew", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
68
69
70

    ProcessFactory factProcessSkewSmFunc = boost::factory<ProcessSkewSmFunc*>();
    ServicesServer::getInstance()->addProcessFactory("skew_sm", factProcessSkewSmFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
71
    ServicesServer::getInstance()->linkProcessWithPlugin("skew_sm", pluginPath);
bf54b7d4   Hacene SI HADJ MOHAND   not woring yet
72
73
74

    ProcessFactory factProcessMedianFunc = boost::factory<ProcessMedianFunc*>();
    ServicesServer::getInstance()->addProcessFactory("median", factProcessMedianFunc);
3caf58ee   Hacene SI HADJ MOHAND   compil mais march...
75
    ServicesServer::getInstance()->linkProcessWithPlugin("median", pluginPath);
e8db9c26   Hacene SI HADJ MOHAND   structure ok
76

403992c8   Hacene SI HADJ MOHAND   scalr ok tested
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
    ProcessFactory factCovarianceCorrelation = boost::factory<CovarianceProcess*>();
    ServicesServer::getInstance()->addProcessFactory("covariance", factCovarianceCorrelation);
    ServicesServer::getInstance()->linkProcessWithPlugin("covariance", pluginPath);

    ProcessFactory factPearsonCorrelation = boost::factory<PearsonProcess*>();
    ServicesServer::getInstance()->addProcessFactory("pearson", factPearsonCorrelation);
    ServicesServer::getInstance()->linkProcessWithPlugin("pearson", pluginPath);
    
    ProcessFactory factKendallCorrelation = boost::factory<KendallProcess*>();
    ServicesServer::getInstance()->addProcessFactory("kendall", factKendallCorrelation);
    ServicesServer::getInstance()->linkProcessWithPlugin("kendall", pluginPath);
    
    ProcessFactory factSpearmanCorrelation = boost::factory<SpearmanProcess*>();
    ServicesServer::getInstance()->addProcessFactory("spearman", factSpearmanCorrelation);
    ServicesServer::getInstance()->linkProcessWithPlugin("spearman", pluginPath);

74a11471   Benjamin Renard   Add min, max, var...
93
}