Debian Codegraph @

src/dr/evomodel/alloppnet/operators/AlloppMoveLegs.java

raw symbols SCIP
1 /*
2 * AlloppMoveLegs.java
3 *
4 * Copyright (c) 2002-2017 Alexei Drummond, Andrew Rambaut and Marc Suchard
5 *
6 * This file is part of BEAST.
7 * See the NOTICE file distributed with this work for additional
8 * information regarding copyright ownership and licensing.
9 *
10 * BEAST is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as
12 * published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * BEAST is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with BEAST; if not, write to the
22 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23 * Boston, MA 02110-1301 USA
24 */
25
26 package dr.evomodel.alloppnet.operators;
27
28 import dr.evomodel.alloppnet.speciation.AlloppSpeciesBindings;
29 import dr.evomodel.alloppnet.speciation.AlloppSpeciesNetworkModel;
30 import dr.evomodel.alloppnet.parsers.AlloppMoveLegsParser;
31 import dr.inference.operators.SimpleMCMCOperator;
32
33
34 /**
35 *
36 * @author Graham Jones
37 * Date: 31/08/2011
38 */
39
40
41 // 2012-07 ood
42 public class AlloppMoveLegs extends SimpleMCMCOperator {
43
44 private final AlloppSpeciesNetworkModel apspnet;
45 private final AlloppSpeciesBindings apsp;
46
47 public AlloppMoveLegs(AlloppSpeciesNetworkModel apspnet, AlloppSpeciesBindings apsp, double weight) {
48 this.apspnet = apspnet;
49 this.apsp = apsp;
50 setWeight(weight);
51 }
52
53
54 public String getPerformanceSuggestion() {
55 return "None";
56 }
57
58 @Override
59 public String getOperatorName() {
60 return AlloppMoveLegsParser.MOVE_LEGS + "(" + apspnet.getId() +
61 "," + apsp.getId() + ")";
62 }
63
64 @Override
65 public double doOperation() {
66 apspnet.beginNetworkEdit();
67 apspnet.moveLegs();
68 apspnet.endNetworkEdit();
69 return 0;
70 }
71
72 }