Debian Codegraph @

src/dr/evomodel/treedatalikelihood/DataLikelihoodDelegate.java

raw symbols SCIP
1 /*
2 * DataLikelihoodDelegate.java
3 *
4 * Copyright (c) 2002-2016 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.treedatalikelihood;
27
28 import dr.inference.model.Model;
29 import dr.xml.Reportable;
30
31 import java.util.List;
32
33 /**
34 * DataLikelihoodDelegate - interface for a plugin delegate for the data likelihood.
35 *
36 * @author Andrew Rambaut
37 * @author Marc Suchard
38 * @version $Id$
39 */
40 public interface DataLikelihoodDelegate extends ProcessOnTreeDelegate, Model, Reportable {
41
42 void makeDirty();
43
44 void storeState();
45
46 void restoreState();
47
48 double calculateLikelihood(List<BranchOperation> branchOperations, List<NodeOperation> nodeOperations,
49 int rootNodeNumber) throws LikelihoodException;
50
51 int getTraitCount();
52
53 int getTraitDim();
54
55 RateRescalingScheme getRateRescalingScheme();
56
57 class DelegateTypeException extends Exception { }
58
59 class LikelihoodException extends Exception { }
60
61 class LikelihoodUnderflowException extends LikelihoodException { }
62
63 class LikelihoodRescalingException extends LikelihoodException { }
64
65 void setCallback(TreeDataLikelihood treeDataLikelihood);
66
67 int vectorizeNodeOperations(List<NodeOperation> nodeOperations, int[] operations);
68
69 // int getActiveNodeIndex(final int index);
70 //
71 // int getActiveMatrixIndex(final int index);
72 }