[beast-mcmc] r6748 committed - Fixed the STJO parser

0 views
Skip to first unread message

beast...@googlecode.com

unread,
Apr 23, 2015, 2:52:15 PM4/23/15
to beast-...@googlegroups.com
Revision: 6748
Author: rambaut
Date: Thu Apr 23 18:51:55 2015 UTC
Log: Fixed the STJO parser
https://code.google.com/p/beast-mcmc/source/detail?r=6748

Modified:
/trunk/build_pathogen.xml
/trunk/build_tracer.xml
/trunk/src/dr/evomodelxml/operators/SubtreeJumpOperatorParser.java

=======================================
--- /trunk/build_pathogen.xml Sun Mar 15 15:07:05 2015 UTC
+++ /trunk/build_pathogen.xml Thu Apr 23 18:51:55 2015 UTC
@@ -173,11 +173,12 @@
<jarbundler dir="${Mac_package_dir}"
name="${name} v${version}"
mainclass="dr.app.pathogen.PathogenApp"
+ stubfile="${Mac_dir}/universalJavaApplicationStub"
icon="${Mac_dir}/icons/Path-O-Gen.icns"
- jvmversion="1.5+"
+ jvmversion="1.6+"
arguments=""
version="${version}"
- infostring="${name} v${version}, Copyright
2006-2013, Andrew Rambaut"
+ infostring="${name} v${version}, Copyright
2006-2015, Andrew Rambaut"
bundleid="pathogen" >
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<jarfileset dir="${dist}">
=======================================
--- /trunk/build_tracer.xml Thu Apr 23 15:57:29 2015 UTC
+++ /trunk/build_tracer.xml Thu Apr 23 18:51:55 2015 UTC
@@ -129,8 +129,8 @@

</target>

- <property name="version" value="1.6.0" />
- <property name="version_number" value="1.6.0" />
+ <property name="version" value="1.6.1pre" />
+ <property name="version_number" value="1.6.1" />
<property name="release_dir" value="release_tracer" />
<property name="name" value="Tracer" />

@@ -216,12 +216,11 @@
name="${name} v${version}"
mainclass="dr.app.tracer.application.TracerApp"
icon="${Mac_dir}/icons/Tracer.icns"
- jvmversion="1.6+"
- stubfile="${Mac_dir}/universalJavaApplicationStub"
+ jvmversion="1.5+"
vmoptions="-Xmx1024M"
arguments=""
version="${version}"
- infostring="${name} v${version}, Copyright
2003-2015, Andrew Rambaut, Marc Suchard &amp; Alexei J. Drummond"
+ infostring="${name} v${version}, Copyright
2003-2013, Andrew Rambaut, Marc Suchard &amp; Alexei J. Drummond"
bundleid="tracer" >
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<jarfileset dir="${dist}">
=======================================
--- /trunk/src/dr/evomodelxml/operators/SubtreeJumpOperatorParser.java Mon
Mar 2 15:06:30 2015 UTC
+++ /trunk/src/dr/evomodelxml/operators/SubtreeJumpOperatorParser.java Thu
Apr 23 18:51:55 2015 UTC
@@ -20,8 +20,6 @@

public Object parseXMLObject(XMLObject xo) throws XMLParseException {

- /*
- No coercion at the moment.
CoercionMode mode = CoercionMode.DEFAULT;
if (xo.hasAttribute(CoercableMCMCOperator.AUTO_OPTIMIZE)) {
if
(xo.getBooleanAttribute(CoercableMCMCOperator.AUTO_OPTIMIZE)) {
@@ -30,21 +28,20 @@
mode = CoercionMode.COERCION_OFF;
}
}
- */

TreeModel treeModel = (TreeModel) xo.getChild(TreeModel.class);
final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);

// final double targetAcceptance =
xo.getAttribute(TARGET_ACCEPTANCE, 0.234);
-//
-// final double size = xo.getAttribute("size", 1.0);
-//
-// if (Double.isInfinite(size) || size <= 0.0) {
-// throw new XMLParseException("size attribute must be positive
and not infinite. was " + size +
-// " for tree " + treeModel.getId() );
-// }
+
+ final double size = xo.getAttribute("size", 1.0);
+
+ if (Double.isInfinite(size) || size <= 0.0) {
+ throw new XMLParseException("size attribute must be positive
and not infinite. was " + size +
+ " for tree " + treeModel.getId() );
+ }

- SubtreeJumpOperator operator = new SubtreeJumpOperator(treeModel,
weight);
+ SubtreeJumpOperator operator = new SubtreeJumpOperator(treeModel,
size, weight, mode);
// operator.setTargetAcceptanceProbability(targetAcceptance);

return operator;
Reply all
Reply to author
Forward
0 new messages