當前位置: 首頁>>代碼示例>>Java>>正文


Java SimpleMCMCOperator類代碼示例

本文整理匯總了Java中dr.inference.operators.SimpleMCMCOperator的典型用法代碼示例。如果您正苦於以下問題:Java SimpleMCMCOperator類的具體用法?Java SimpleMCMCOperator怎麽用?Java SimpleMCMCOperator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SimpleMCMCOperator類屬於dr.inference.operators包,在下文中一共展示了SimpleMCMCOperator類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: parseXMLObject

import dr.inference.operators.SimpleMCMCOperator; //導入依賴的package包/類
public Object parseXMLObject(XMLObject xo) throws XMLParseException {

        final double weight = xo.getDoubleAttribute(WEIGHT);

        JointGibbsOperator operator = new JointGibbsOperator(weight);

        for (int i = 0; i < xo.getChildCount(); i++) {
            if (xo.getChild(i) instanceof  GibbsOperator)
                operator.addOperator((SimpleMCMCOperator) xo.getChild(i));
            else
                throw new RuntimeException("Operator list must consist only of GibbsOperators");
        }

        return operator;
    }
 
開發者ID:beast-dev,項目名稱:beast-mcmc,代碼行數:16,代碼來源:JointGibbsOperatorParser.java

示例2: parseXMLObject

import dr.inference.operators.SimpleMCMCOperator; //導入依賴的package包/類
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {

    for (int i = 0; i < xo.getChildCount(); ++i) {
        SimpleMCMCOperator operator = (SimpleMCMCOperator) xo.getChild(i);
        operator.doOperation();
    }
    return null;
}
 
開發者ID:beast-dev,項目名稱:beast-mcmc,代碼行數:10,代碼來源:ApplyOperatorOnceParser.java

示例3: parseXMLObject

import dr.inference.operators.SimpleMCMCOperator; //導入依賴的package包/類
public Object parseXMLObject(XMLObject xo) throws XMLParseException {

        final double weight = xo.getDoubleAttribute(WEIGHT);

        final double targetProb = xo.getAttribute(TARGET_ACCEPTANCE, 0.2);

        if (targetProb <= 0.0 || targetProb >= 1.0)
            throw new RuntimeException("Target acceptance probability must be between 0.0 and 1.0");

        JointOperator operator = new JointOperator(weight, targetProb);

        for (int i = 0; i < xo.getChildCount(); i++) {
            operator.addOperator((SimpleMCMCOperator) xo.getChild(i));
        }

        return operator;
    }
 
開發者ID:beast-dev,項目名稱:beast-mcmc,代碼行數:18,代碼來源:JointOperatorParser.java

示例4: getSyntaxRules

import dr.inference.operators.SimpleMCMCOperator; //導入依賴的package包/類
@Override
public XMLSyntaxRule[] getSyntaxRules() {
    return new XMLSyntaxRule[]{
            new ElementRule(SimpleMCMCOperator.class, 1, Integer.MAX_VALUE),
    };
}
 
開發者ID:beast-dev,項目名稱:beast-mcmc,代碼行數:7,代碼來源:ApplyOperatorOnceParser.java


注:本文中的dr.inference.operators.SimpleMCMCOperator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。