-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathinfextract3.h
More file actions
35 lines (32 loc) · 1.11 KB
/
Copy pathinfextract3.h
File metadata and controls
35 lines (32 loc) · 1.11 KB
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
#ifndef INFEXTRACT3_H
#define INFEXTRACT3_H
#include <vector>
#include "state.h"
#include "data.h"
#include "rng.h"
#include "node.h"
#include "fsxml.h"
namespace fines
{
/**
@brief Inference algorithm: extraction of tree split support
*/
class InfExtract3
{
public:
InfExtract3(Data *d,FsXml *fs,std::vector<Node*> nodes, bool v=false);///<Constructor
~InfExtract3();
double getSingleSplit(State *state, std::vector<int> tips);///< returns the proportion of agreement between the tips can be constructed out of populations in the state, 0 if they can't
double getSingleSplitStrict(State *state, std::vector<int> tips);///< returns 1 if the tips can be constructed out of populations in the state, 0 if they can't
std::vector<double> getSplits(State *state, std::vector<Node*> nodes,bool strict=true);///< gets the vector of splits for all nodes above startnode
inline State * getState(){return(state);}///< Returns the state
protected:
Data *data;
State *state;
bool verbose;
std::vector<double> weights;
std::vector<double> weights2;
int counts;
};
} // end namespace fines
#endif