Maximum Acyclic Subgraph - Multiple Sequence Alignment
MaximumAcyclicSubgraph
State.h
1 #ifndef STATE_H
2 #define STATE_H
3 
4 #include <iostream>
5 #include <vector>
6 #include <array>
7 #include "Node.h"
8 #include "Edge.h"
9 #include "Graph.h"
10 
16 class state{
17 
18  public:
19  state(Graph& graph);
20  state(std::vector <Edge> e);
21  state();
22  ~state();
23 
29  std::vector <Edge> edges;
30  std::vector <bool> selectedSubset;
31  std::vector <bool> selectable;
32  std::vector<unsigned int> selectedEdgeIndex;
33  unsigned int score;
34 
35  vector<unsigned int> successorStates;
36 
41  void select(int i);
42 
52  void updateSelectability(int i);
53 
61  bool consistent(Edge& e, Edge& f);
62 
66  bool hasEdge();
67 
71  void reset();
72 
75  vector<unsigned int> calcSuccessorStates();
76 
85  void calculate_score();
86 };
87 
88 #endif
std::vector< bool > selectable
Shows whether edge is selectable in the current subset (true = selectable)
Definition: State.h:31
Definition: Graph.h:17
Definition: Edge.h:8
unsigned int score
The score of the State.
Definition: State.h:33
bool hasEdge()
Definition: State.cc:84
bool consistent(Edge &e, Edge &f)
Definition: State.cc:72
void select(int i)
Definition: State.cc:33
void reset()
Definition: State.cc:43
void calculate_score()
Definition: State.cc:92
This state class encapsulates the current game state. It can output possible actions and select them...
Definition: State.h:16
std::vector< bool > selectedSubset
Shows whether edge is selected in current subset (true = selected)
Definition: State.h:30
vector< unsigned int > calcSuccessorStates()
Definition: State.cc:113
std::vector< unsigned int > selectedEdgeIndex
contains indices from "edges" for all edges that are selected
Definition: State.h:32
void updateSelectability(int i)
Definition: State.cc:52
std::vector< Edge > edges
Definition: State.h:29
vector< unsigned int > successorStates
The indices of edges that if set are a direct successor State.
Definition: State.h:35