File: TreeCollection.h

package info (click to toggle)
iqtree 1.6.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,140 kB
  • sloc: cpp: 111,752; ansic: 53,619; python: 242; sh: 195; makefile: 52
file content (63 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download | duplicates (3)
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
63
//
// Created by tung on 6/23/15.
//

#ifndef IQTREE_TREECOLLECTION_H
#define IQTREE_TREECOLLECTION_H
#include "tree/candidateset.h"

/**
 *  A container for a set of trees together with their scores
 */
class TreeCollection {
private:
    vector<string> treeStrings;
    vector<double> scores;
    vector<int> sourceProcID;
public:

    /**
     *  Constructor
     */
    TreeCollection() {};

    TreeCollection(vector<string>& trees, vector<double>& scores, vector<int> &sourceProcID);

    void addTrees(TreeCollection &trees);

    void addTrees(CandidateSet& candidateTrees);


    /*
     *  Get i-th tree and its score
    */
    pair<string, double> getTree(int i);

    void clear();

    void setTreeStrings(const vector<string> treeStrings) {
        TreeCollection::treeStrings = treeStrings;
    }

    void setScores(const vector<double> scores) {
        TreeCollection::scores = scores;
    }

    size_t getNumTrees();

    const vector<string> &getTreeStrings() const {
        return treeStrings;
    }

    const vector<double> &getScores() const {
        return scores;
    }

    const vector<int> &getSourceProcID() const {
        return sourceProcID;
    }

};


#endif //IQTREE_TREECOLLECTION_H