From 056a0dccd0d57e3b52a7892d82908d9585025f62 Mon Sep 17 00:00:00 2001 From: "Marc A. Suchard" Date: Sat, 4 Nov 2023 06:05:23 -0700 Subject: [PATCH] minor tweaks --- src/dr/inference/distribution/RandomFieldGradient.java | 2 +- src/dr/inference/hmc/TransformedGradientWrtParameter.java | 2 +- .../hmc/TransformedGradientWrtParameterParser.java | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/dr/inference/distribution/RandomFieldGradient.java b/src/dr/inference/distribution/RandomFieldGradient.java index 8cf8791967..06f274c003 100644 --- a/src/dr/inference/distribution/RandomFieldGradient.java +++ b/src/dr/inference/distribution/RandomFieldGradient.java @@ -69,7 +69,7 @@ public double[] getGradientLogDensity(Object x) { } @Override public String getReport() { - return GradientWrtParameterProvider.getReportAndCheckForError(this, 0.0, + return GradientWrtParameterProvider.getReportAndCheckForError(this, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null); } diff --git a/src/dr/inference/hmc/TransformedGradientWrtParameter.java b/src/dr/inference/hmc/TransformedGradientWrtParameter.java index fe4ff14d50..b8738a4e36 100644 --- a/src/dr/inference/hmc/TransformedGradientWrtParameter.java +++ b/src/dr/inference/hmc/TransformedGradientWrtParameter.java @@ -83,7 +83,7 @@ public double[] getGradientLogDensity() { @Override public String getReport() { - return GradientWrtParameterProvider.getReportAndCheckForError(this, 0.0, + return GradientWrtParameterProvider.getReportAndCheckForError(this, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null); } } diff --git a/src/dr/inferencexml/hmc/TransformedGradientWrtParameterParser.java b/src/dr/inferencexml/hmc/TransformedGradientWrtParameterParser.java index d8939b0b7d..27c30922f5 100644 --- a/src/dr/inferencexml/hmc/TransformedGradientWrtParameterParser.java +++ b/src/dr/inferencexml/hmc/TransformedGradientWrtParameterParser.java @@ -1,7 +1,7 @@ /* - * GradientWrapperParser.java + * TransformedGradientWrtParameterParser.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 @@ -29,7 +29,6 @@ import dr.inference.hmc.TransformedGradientWrtParameter; import dr.inference.model.Parameter; import dr.inference.model.TransformedParameter; -import dr.util.Transform; import dr.xml.*; /**