• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java CompoundDistribution类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中beast.core.util.CompoundDistribution的典型用法代码示例。如果您正苦于以下问题:Java CompoundDistribution类的具体用法?Java CompoundDistribution怎么用?Java CompoundDistribution使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

CompoundDistribution类属于beast.core.util包,在下文中一共展示了CompoundDistribution类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addTraitSet

点赞 3

import beast.core.util.CompoundDistribution; //导入依赖的package包/类
/**
 * assigns trait to first available tree *
 */
void addTraitSet(TraitSet trait) {
    if (trait != null) {
        CompoundDistribution likelihood = (CompoundDistribution) pluginmap.get("likelihood");
        for (Distribution d : likelihood.pDistributions.get()) {
            if (d instanceof GenericTreeLikelihood) {
                try {
                    // TODO: this might not be a valid type conversion from TreeInterface to Tree
                    Tree tree = (Tree) ((GenericTreeLikelihood) d).treeInput.get();
                    tree.m_traitList.setValue(trait, tree);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                scrubAll(true, false);
                return;
            }
        }
    }
}
 

开发者ID:CompEvol,
项目名称:beast2,
代码行数:22,
代码来源:BeautiDoc.java

示例2: assertParameterCountInPriorIs

点赞 3

import beast.core.util.CompoundDistribution; //导入依赖的package包/类
void assertParameterCountInPriorIs(int i) {
	// count nr of parameters in Prior objects in prior
	// including those for prior distributions (Normal, etc)
	// useful to make sure they do (or do not) get linked
	Set<Function> parameters = new LinkedHashSet<>();
	CompoundDistribution prior = (CompoundDistribution) doc.pluginmap.get("prior");
	for (Distribution p : prior.pDistributions.get()) {
		if (p instanceof Prior) {
			Prior p2 = (Prior) p;
			parameters.add(p2.m_x.get());
			for (BEASTInterface o : p2.distInput.get().listActiveBEASTObjects()) {
				if (o instanceof Parameter) {
					parameters.add((Parameter<?>) o);
				}
			}
		}
	}
	System.err.println("Number of parameters in prior = " + parameters.size());
	if (i >= 0) {
		assertThat(parameters.size()).as("Expected " + i + " parameters in prior").isEqualTo(i);
	}
}
 

开发者ID:CompEvol,
项目名称:beast2,
代码行数:23,
代码来源:BeautiBase.java

示例3: NS

点赞 2

import beast.core.util.CompoundDistribution; //导入依赖的package包/类
public NS(int chainLength, int preBurnin, int particleCount, int subChainLength, State state, List<Operator> operators, CompoundDistribution distribution, Double epsilon) {
	initByName("chainLength", chainLength, 
			"preBurnin", preBurnin, 
			"particleCount", particleCount,
			"subChainLength", subChainLength,
			"state", state,
			"operator", operators,
			"distribution", distribution,
			"epsilon", epsilon);
}
 

开发者ID:BEAST2-Dev,
项目名称:nested-sampling,
代码行数:11,
代码来源:NS.java

示例4: customConnector

点赞 2

import beast.core.util.CompoundDistribution; //导入依赖的package包/类
public static void customConnector(BeautiDoc doc) {
	Object o0 = doc.pluginmap.get("prior");
	if (o0 != null && o0 instanceof CompoundDistribution) {
		CompoundDistribution p =  (CompoundDistribution) o0;
		for (Distribution p0 : p.pDistributions.get()) {
			if (p0 instanceof MRCAPrior) {
				MRCAPrior prior = (MRCAPrior) p0;
		        if (prior.treeInput.get() != null) {
		        	boolean isInState = false;
		        	for (BEASTInterface o : prior.treeInput.get().getOutputs()) {
		        		if (o instanceof State) {
		        			isInState = true;
		        			break;
		        		}
		        	}
		        	if (!isInState) {
		        		doc.disconnect(prior, "prior", "distribution");
		        		doc.disconnect(prior, "tracelog", "log");
		        		if (prior.onlyUseTipsInput.get()) {
		        			disableTipSampling(prior, doc);
		        		}
		        		doc.unregisterPlugin(prior);
		        		return;
		        	}
				}
			}
		}
	}

}
 

开发者ID:CompEvol,
项目名称:beast2,
代码行数:31,
代码来源:MRCAPriorInputEditor.java

示例5: reportLogLikelihoods

点赞 2

import beast.core.util.CompoundDistribution; //导入依赖的package包/类
protected void reportLogLikelihoods(final Distribution distr, final String tabString) {
    final double full =  distr.logP, last = distr.storedLogP;
    final String changed = full == last ? "" : "  **";
    Log.info.println(tabString + "P(" + distr.getID() + ") = " + full + " (was " + last + ")" + changed);
    if (distr instanceof CompoundDistribution) {
        for (final Distribution distr2 : ((CompoundDistribution) distr).pDistributions.get()) {
            reportLogLikelihoods(distr2, tabString + "\t");
        }
    }
}
 

开发者ID:CompEvol,
项目名称:beast2,
代码行数:11,
代码来源:MCMC.java

示例6: collectTargetDensities

点赞 2

import beast.core.util.CompoundDistribution; //导入依赖的package包/类
protected void collectTargetDensities(final Distribution distr, List<Double> densities) {
    densities.add(distr.getCurrentLogP());
    if (distr instanceof CompoundDistribution) {
        for (final Distribution childDistr : ((CompoundDistribution) distr).pDistributions.get()) {
            collectTargetDensities(childDistr, densities);
        }
    }
}
 

开发者ID:tgvaughan,
项目名称:bacter,
代码行数:9,
代码来源:MCMCTrace.java

示例7: collectTargetDensityNames

点赞 2

import beast.core.util.CompoundDistribution; //导入依赖的package包/类
protected void collectTargetDensityNames(final Distribution distr, List<String> densityNames) {
    densityNames.add(distr.getID());
    if (distr instanceof CompoundDistribution) {
        for (final Distribution childDistr : ((CompoundDistribution) distr).pDistributions.get()) {
            collectTargetDensityNames(childDistr, densityNames);
        }
    }
}
 

开发者ID:tgvaughan,
项目名称:bacter,
代码行数:9,
代码来源:MCMCTrace.java

示例8: reportTargetDensities

点赞 2

import beast.core.util.CompoundDistribution; //导入依赖的package包/类
protected static void reportTargetDensities(final Distribution distr) {
    System.out.println(distr.getID() + ": " + distr.getCurrentLogP());
    if (distr instanceof CompoundDistribution) {
        for (final Distribution childDistr : ((CompoundDistribution) distr).pDistributions.get()) {
            reportTargetDensities(childDistr);
        }
    }
}
 

开发者ID:tgvaughan,
项目名称:bacter,
代码行数:9,
代码来源:DensityCalculator.java

示例9: priorsAsString

点赞 2

import beast.core.util.CompoundDistribution; //导入依赖的package包/类
String priorsAsString() {
	CompoundDistribution prior = (CompoundDistribution) doc.pluginmap.get("prior");
	List<Distribution> priors = prior.pDistributions.get();
	return "assertPriorsEqual" + pluginListAsString(priors);
}
 

开发者ID:CompEvol,
项目名称:beast2,
代码行数:6,
代码来源:BeautiBase.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)