File: TreeCollection.h

package info (click to toggle)
iqtree 1.5.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,780 kB
  • ctags: 11,529
  • sloc: cpp: 96,162; ansic: 59,874; python: 242; sh: 189; makefile: 45
file content (63 lines) | stat: -rw-r--r-- 1,219 bytes parent folder | download | duplicates (2)
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 "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