当前位置: 首页>>代码示例>>Java>>正文


Java Log.warning方法代码示例

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


在下文中一共展示了Log.warning方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: issueSlowWarning

import beast.core.util.Log; //导入方法依赖的package包/类
private void issueSlowWarning() {
    if( ! warningIssued )
    Log.warning("This calibrated Yule analysis with " + orderedCalibrations.length + " calibrations will take a looong time.\n"
            +"Possibly will never complete even a single step. You can change the type of the calibration to 'none' (type=\"none\"\n"
            + "in the XML) and get the non-calibrated Yule just like in BEAST1, or set type to \"restricted\", a variant of the\n" +
            "calibrated Yule which runs faster and where the proterior distribution of the node times is more similar to the\n" +
            "actual calibration than the \"none\" case. In both cases test to see how far your posterior calibrations are from the " +
            "specifications.");
    warningIssued = true;
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:11,代码来源:CalibratedYuleModel.java

示例2: validateInputs

import beast.core.util.Log; //导入方法依赖的package包/类
@Override
public void validateInputs() {
    if (conditionalOnRootInput.get()) {
        // make sure there is an MRCAPrior on the root
        TreeInterface tree = treeInput.get();
        int n = tree.getTaxonset().getTaxonCount();
        boolean found = false;
        for (BEASTInterface o : ((BEASTInterface) tree).getOutputs()) {
            if (o instanceof MRCAPrior) {
                MRCAPrior prior = (MRCAPrior) o;
                int n2 = prior.taxonsetInput.get().taxonsetInput.get().size();
                if (n2 == n) {
                    found = true;
                }
            }
        }
        if (!found) {
            Log.warning("WARNING: There must be an MRCAPrior on the root when conditionalOnRoot=true, but could not find any");
        }
    }

    super.validateInputs();
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:24,代码来源:YuleModel.java

示例3: initParticles

import beast.core.util.Log; //导入方法依赖的package包/类
protected void initParticles() {
	minLikelihood = Double.NEGATIVE_INFINITY;
	for (int i = 0; i < particleCount; i++) {
		for (int j = 0; j < subChainLength; j++) {
			composeProposal(1);
		}

		particleStates[i] = state.toXML(0);
		particleLikelihoods[i] = likelihood.getArrayValue();
	}
	Log.warning(particleCount + " particles initialised");
}
 
开发者ID:BEAST2-Dev,项目名称:nested-sampling,代码行数:13,代码来源:NS.java

示例4: getTaxaNames

import beast.core.util.Log; //导入方法依赖的package包/类
/**
 * @returns an array of taxon names in order of their node numbers.
 * Note that in general no special order of taxa is assumed, just the order
 * assumed in this tree. Consider using tree.m_taxonset.get().asStringList()
 * instead.
 */
public String [] getTaxaNames() {
     if (m_sTaxaNames == null || (m_sTaxaNames.length == 1 && m_sTaxaNames[0] == null) || m_sTaxaNames.length == 0) {
         // take taxa from tree if one exists
         if( root != null ) {
             m_sTaxaNames = new String[getNodeCount()];
             collectTaxaNames(getRoot());
             List<String> taxaNames = new ArrayList<>();
             for (int i=0; i<m_sTaxaNames.length && i<getLeafNodeCount(); i++) {
                 String name = m_sTaxaNames[i];
                 if (name != null) {
                     taxaNames.add(name);
                 }
             }
             m_sTaxaNames = taxaNames.toArray(new String[]{});
         } else {
             // no tree? use taxon set.
             final TaxonSet taxonSet = m_taxonset.get();
             if (taxonSet != null) {
                 final List<String> txs = taxonSet.asStringList();
                 m_sTaxaNames = txs.toArray(new String[txs.size()]);
             } else {
                Log.err("No taxa specified");
             }
        }
    }

    // sanity check
    if (m_sTaxaNames.length == 1 && m_sTaxaNames[0] == null) {
        Log.warning("WARNING: tree interrogated for taxa, but the tree was not initialised properly. To fix this, specify the taxonset input");
    }
    return m_sTaxaNames;
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:39,代码来源:Tree.java

示例5: loadExternalJars

import beast.core.util.Log; //导入方法依赖的package包/类
public static void loadExternalJars(String packagesString) throws IOException {
    processDeleteList();

    addInstalledPackages(packages);

    processInstallList(packages);

    if (packagesString != null && packagesString.trim().length() > 0) {
    	String unavailablePacakges = "";
    	String [] packageAndVersions = packagesString.split(":");
    	for (String s : packageAndVersions) {
    		s = s.trim();
    		int i = s.lastIndexOf(" ");
    		if (i > 0) {
    			String pkgname = s.substring(0, i);
    			String pkgversion = s.substring(i+1).trim().replaceAll("v", "");
    			Package pkg = new Package(pkgname);
    			PackageVersion version = new PackageVersion(pkgversion);
    	    	useArchive = true;
    			String dirName = getPackageDir(pkg, version, false, System.getProperty("BEAST_ADDON_PATH"));
    			if (new File(dirName).exists()) {
    				loadPacakge(dirName);
    			} else {
    				// check the latest installed version
    				Package pkg2 = packages.get(pkgname);
    				if (pkg2 == null || !pkg2.isInstalled() || !pkg2.getInstalledVersion().equals(version)) {
        				unavailablePacakges += s +", ";
    				} else {
         	    	useArchive = false;
         			dirName = getPackageDir(pkg, version, false, System.getProperty("BEAST_ADDON_PATH"));
         			if (new File(dirName).exists()) {
         				loadPacakge(dirName);
         			} else {
         				unavailablePacakges += s +", ";
         			}
    				}
    			}
    		}
    	}
    	if (unavailablePacakges.length() > 1) {
    		unavailablePacakges = unavailablePacakges.substring(0, unavailablePacakges.length() - 2);
    		if (unavailablePacakges.contains(",")) {
    			Log.warning("The following packages are required, but not available: " + unavailablePacakges);
    		} else {
    			Log.warning("The following package is required, but is not available: " + unavailablePacakges);
    		}
    		Log.warning("See http://beast2.org/managing-packages/ for details on how to install packages.");
    	}
    }
    externalJarsLoaded = true;
    Alignment.findDataTypes();
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:53,代码来源:AddOnManager.java

示例6: parse

import beast.core.util.Log; //导入方法依赖的package包/类
/**
 * parse BEAST file as DOM document
 * @throws XMLParserException 
 */
public void parse() throws XMLParserException {
    // find top level beast element
    final NodeList nodes = doc.getElementsByTagName("*");
    if (nodes == null || nodes.getLength() == 0) {
        throw new XMLParserException("Expected top level beast element in XML");
    }
    final Node topNode = nodes.item(0);
    final double version = getAttributeAsDouble(topNode, "version");
    if (version < 2.0 || version == Double.MAX_VALUE) {
        throw new XMLParserException(topNode, "Wrong version: only versions > 2.0 are supported", 101);
    }

    String required = getAttribute(topNode, "required");
    if (required != null && required.trim().length() > 0) {
    	String [] packageAndVersions = required.split(":");
    	for (String s : packageAndVersions) {
    		s = s.trim();
    		int i = s.lastIndexOf(" ");
    		if (i > 0) {
    			String pkgname = s.substring(0, i);
    			String pkgversion = s.substring(i+1);
    			if (!AddOnManager.isInstalled(pkgname, pkgversion)) {
    				unavailablePacakges += s +", ";
    			}
    		}
    	}
    	if (unavailablePacakges.length() > 1) {
    		unavailablePacakges = unavailablePacakges.substring(0, unavailablePacakges.length() - 2);
    		if (unavailablePacakges.contains(",")) {
    			Log.warning("The following packages are required, but not available: " + unavailablePacakges);
    		} else {
    			Log.warning("The following package is required, but is not available: " + unavailablePacakges);
    		}
    		Log.warning("See http://beast2.org/managing-packages/ for details on how to install packages.");
    	}
    }

    initIDNodeMap(topNode);
    parseNameSpaceAndMap(topNode);

    //parseState();
    parseRunElement(topNode);
    initBEASTObjects();
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:49,代码来源:XMLParser.java


注:本文中的beast.core.util.Log.warning方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。