A toolkit for working with phylogenetic data.
v0.18.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
placement.cpp
Go to the documentation of this file.
1 /*
2  Genesis - A toolkit for working with phylogenetic data.
3  Copyright (C) 2014-2017 Lucas Czech
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  Contact:
19  Lucas Czech <lucas.czech@h-its.org>
20  Exelixis Lab, Heidelberg Institute for Theoretical Studies
21  Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
22 */
23 
32 
34 
35 #include <assert.h>
36 
37 namespace genesis {
38 namespace placement {
39 
40 // =================================================================================================
41 // Properties
42 // =================================================================================================
43 
51 {
52  return edge_->data<PlacementEdgeData>().edge_num();
53 }
54 
59 {
60  return *edge_;
61 }
62 
67 {
68  return *edge_;
69 }
70 
80 {
81  edge_ = &edge;
82 }
83 
84 } // namespace placement
85 } // namespace genesis
Data class for PlacementTreeEdges. Stores the branch length of the edge, and the edge_num, as defined in the jplace standard.
const PlacementTreeEdge & edge() const
Get the PlacementTreeEdge where this PqueryPlacement is placed.
Definition: placement.cpp:58
void reset_edge(PlacementTreeEdge &edge)
Set the PlacementTreeEdge at which this PqueryPlacement is placed.
Definition: placement.cpp:79
int edge_num() const
Get the edge_num where this PqueryPlacement is placed.
Definition: placement.cpp:50
EdgeDataType & data()
Definition: edge.hpp:118
Header of PqueryPlacement class.