Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed Oct 7, 2023
1 parent 8e07963 commit 52331dc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,9 @@ static double[] getAffineDifferentialMassMatrix(double time,
multiply(tmp, oneMinusQPlusQ, differentials, 1.0, stateCount);
multiply(correction, tmp, qQPlus, 1.0, stateCount);

// System.err.println("corr: " + new WrappedVector.Raw(correction));

for (int i = 0; i < differentials.length; ++i) {
differentials[i] -= correction[i];
}
for (int i = 0; i < differentials.length; ++i) {
differentials[i] -= correction[i];
}

return differentials;
}
Expand Down
3 changes: 0 additions & 3 deletions src/dr/evomodel/substmodel/DifferentialMassProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ public double[] dispatch(double time,
DifferentiableSubstitutionModel model,
WrappedMatrix infinitesimalDifferentialMatrix) {

double[] q = new double[16];
model.getInfinitesimalMatrix(q);

return DifferentiableSubstitutionModelUtil.getAffineDifferentialMassMatrix(
time, infinitesimalDifferentialMatrix, model.getEigenDecomposition());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* HomogeneousSubstitutionParameterGradient.java
*
* Copyright (c) 2002-2017 Alexei Drummond, Andrew Rambaut and Marc Suchard
* Copyright (c) 2002-2023 Alexei Drummond, Andrew Rambaut and Marc Suchard
*
* This file is part of BEAST.
* See the NOTICE file distributed with this work for additional
Expand Down Expand Up @@ -55,11 +55,6 @@ public class HomogeneousSubstitutionParameterGradient implements GradientWrtPara
private final TreeDataLikelihood treeDataLikelihood;
private final TreeTrait treeTraitProvider;
private final Tree tree;

// private final Mode mode = Mode.EXACT;
// private final Mode mode = Mode.FIRST_ORDER;
// private final Mode mode = Mode.AFFINE;

private final Mode mode;

public HomogeneousSubstitutionParameterGradient(String traitName,
Expand Down

0 comments on commit 52331dc

Please sign in to comment.