Vespucci  1.0.0
interprocesssender.h
Go to the documentation of this file.
1 #ifndef INTERPROCESSSENDER_H
2 #define INTERPROCESSSENDER_H
3 #include <Math/VespucciMath.h>
4 
5 namespace Vespucci{
6  namespace External{
8  {
9  public:
10  InterprocessSender(std::map<std::string, arma::mat*> invars, std::vector<std::string> outvar_names);
11  bool SendToOctave(std::string command);
12  bool SendToR(std::string command);
13  std::map<std::string, arma::mat> GetValues();
14  private:
15  std::map<std::string, arma::mat*> invars_;
16  std::vector<std::string> outvar_names_;
17  std::map<std::string, arma::mat> outvars_;
18  bool ReceiveValues();
19  };
20 
22  {
23  int n_rows_;
24  int n_cols_;
25  double_vector data_;
26  char_string name_;
27  public:
28  data_object(const char* name, int n_rows, int n_cols, const void_allocator &void_alloc)
29  : n_rows_(n_rows), n_cols_(n_cols), data_(void_alloc), name_(name, void_alloc){}
30  void push_back(double val){data_.push_back(val);}
31  };
32 
33  }
34 }
35 
36 #endif // INTERPROCESSSENDER_H
bool SendToR(std::string command)
InterprocessSender(std::map< std::string, arma::mat * > invars, std::vector< std::string > outvar_names)
data_object(const char *name, int n_rows, int n_cols, const void_allocator &void_alloc)
bool SendToOctave(std::string command)
std::map< std::string, arma::mat > GetValues()
A namespace for "global" functions, including math functions.