CEBL  2.1
DecisionConfig.hpp
Go to the documentation of this file.
1 /*
2 * CEBL : CSU EEG Brain-Computer Interface Lab
3 *
4 * Author: Jeshua Bratman - jeshuabratman@gmail.com
5 *
6 * This file is part of CEBL.
7 *
8 * CEBL is free software; you can redistribute it and/or modify it.
9 * We only ask that if you use our code that you cite the source in
10 * your project or publication.
11 *
12 * EEG Group (www.cs.colostate.edu/eeg)
13 * Department of Computer Science
14 * Colorado State University
15 *
16 */
17 
25 #ifndef DECISIONCONFIG_H
26 #define DECISIONCONFIG_H
27 
28 //std includes
29 #include <vector>
30 using namespace std;
31 
32 #include "PluginLoader.hpp"
33 #include "Decision.hpp"
34 #include "Param.hpp"
35 #include "SessionManager.hpp"
36 using namespace CEBL;
37 
38 //forward declarations
39 class CEBLModel;
40 
42 {
43 private:
44  //make session manager a friend
45  friend class SessionManager;
46 
47  CEBLModel *model;
48 
49  //decision plugins
50  PluginLoader<Decision> * plugin_loader;
51  PluginLoader<Decision> * getPluginLoader() { return plugin_loader; }
52 
53 
54  //selected decision
55  string selected_decision;
56 
57 public:
59  ~DecisionConfig();
60 
61  //GETTING OPERATIONS
62  std::vector<string> getNameList();
63  std::vector<string> getPathList();
64  string getSelected();
65  std::map<std::string, CEBL::Param> getParams(string decision = "");
66 
67  //SETTING OPERATIONS
68  void setSelected(string decision = "");
69  void setParams(std::map<std::string, CEBL::Param> list,string decision = "");
70 
71  //DECTION OPERATIONS
72  void updateWithProbabilities(std::vector<std::vector<double> >probs);
73  void updateWithProbabilities(std::vector<double> probs);
74  void updateWithClassification(ublas::vector<int> classes);
75  void updateWithClassification(int cls);
76  void init(int num_classes);
77  std::vector<double> decideClasses();
78 };
79 
80 #endif
81