-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOmega.h
62 lines (48 loc) · 2.06 KB
/
Omega.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef OMEGA_H
#define OMEGA_H
#include"Data.h"
#include"Graph.h"
#include"Edge.h"
#include "ListPiece.h"
#include "Piece.h"
#include <math.h>
#include<vector>
#include <stdlib.h>
class Omega
{
public:
Omega(Graph graph);
~Omega();
std::vector< std::vector< int > > GetChangepoints() const;
std::vector< std::vector< double > > GetParameters() const;
std::vector< std::vector< int > > GetStates() const;
std::vector< std::vector< bool > > GetForced() const;
std::vector< double > GetGlobalCost() const;
///////// TESTING TESTING TESTING
void gfpopTest(Data const& data);
void initialize_LP_ts_TEST(Point firstData, unsigned int n);
///////////////
void initialize_LP_ts(Point firstData, unsigned int n);
void gfpop(Data const& data);
void gfpopTestMode(Data const& data);
///////////////
void LP_edges_operators(unsigned int t);
void LP_edges_addPointAndPenalty(Point const& pt);
void LP_t_new_multipleMinimization(unsigned int t);
void backtracking();
void show();
private:
Graph m_graph; ///graph of the constraints. 9 variables
unsigned int p; ///number of states in the graph = number of columns in the matrix Q_ts
unsigned int q; ///number of edges in the graph = number of elements in the object Q_edges
unsigned int n; //size of the data
ListPiece* LP_edges; /// transformed cost by the operators for each edge (size 1 x q)
ListPiece** LP_ts; ///cost function Q with respect to position t and state s (size t x p), t = vector size.
std::vector< std::vector< int > > changepoints; ///vector of changepoints build by fpop (first index of each segment). size c
std::vector< std::vector< double > > parameters; ///vector of means build by fpop. size c
std::vector< std::vector< int > > states; ///vector of states build by fpop. size c
std::vector< std::vector< bool > > forced; ///vector of forced = false or true. true = forced value. size c-1
std::vector< double > globalCost;
};
std::ostream &operator<<(std::ostream &s, const Omega &om);
#endif // OMEGA_H