Skip to content

Commit

Permalink
nodes, weights, and smethign to tr to combine everything
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavidrcamacho committed Oct 26, 2018
1 parent cf5f010 commit 2529960
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
15 changes: 8 additions & 7 deletions src/Nodes.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "Nodes.h"
#include "Data.h"
#include "GPRN.h"
#include "Nodes.h"

#include <iostream>
#include <fstream>
#include <cmath>
Expand All @@ -9,19 +11,18 @@
using namespace std;
using namespace Eigen;

Nodes Nodes::instance;
Nodes::Nodes()
{

}


const vector<double>& t = Data::get_instance().get_t();
const vector<double>& sig = Data::get_instance().get_sig();
int N = Data::get_instance().get_t().size();
extern vector<double> t; //= Data::get_instance().get_t();
extern vector<double> sig; //= Data::get_instance().get_sig();
extern int N; //= Data::get_instance().get_t().size();

//just to compile for now
double extra_sigma;

extern double extra_sigma;

Eigen::MatrixXd Nodes::constant(std::vector<double> vec)
// vec = [constant]
Expand Down
9 changes: 7 additions & 2 deletions src/Nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define NODES_H

#include "Data.h"
#include "RVmodel.h"
#include <Eigen/Core>
#include <Eigen/Dense>

Expand Down Expand Up @@ -29,10 +30,14 @@ class Nodes
//matern 5/2 kernel
Eigen::MatrixXd matern52(std::vector<double> vec);


private:
Eigen::MatrixXd C {Data::get_instance().N(), Data::get_instance().N()};


//Singleton
public:
static Nodes& get_instance() {return instance ;}
private:
static Nodes instance;
};

#endif // NODES_H

0 comments on commit 2529960

Please sign in to comment.