net.sourceforge.argparse4j.inf.Namespace.getDouble()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中net.sourceforge.argparse4j.inf.Namespace.getDouble()方法的一些代码示例,展示了Namespace.getDouble()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Namespace.getDouble()方法的具体详情如下:
包路径:net.sourceforge.argparse4j.inf.Namespace
类名称:Namespace
方法名:getDouble

Namespace.getDouble介绍

[英]Returns attribute as Double with given attribute name dest.
[中]返回具有给定属性名称dest的双精度属性。

代码示例

代码示例来源:origin: AsamK/signal-cli

@Override
  public int handleCommand(final Namespace ns, final Manager m) {
    if (!m.isRegistered()) {
      System.err.println("User is not registered.");
      return 1;
    }
    double timeout = 5;
    if (ns.getDouble("timeout") != null) {
      timeout = ns.getDouble("timeout");
    }
    boolean returnOnTimeout = true;
    if (timeout < 0) {
      returnOnTimeout = false;
      timeout = 3600;
    }
    boolean ignoreAttachments = ns.getBoolean("ignore_attachments");
    try {
      final Manager.ReceiveMessageHandler handler = ns.getBoolean("json") ? new JsonReceiveMessageHandler(m) : new ReceiveMessageHandler(m);
      m.receiveMessages((long) (timeout * 1000), TimeUnit.MILLISECONDS, returnOnTimeout, ignoreAttachments, handler);
      return 0;
    } catch (IOException e) {
      System.err.println("Error while receiving messages: " + e.getMessage());
      return 3;
    } catch (AssertionError e) {
      handleAssertionError(e);
      return 1;
    }
  }
}

代码示例来源:origin: graphhopper/map-matching

build();
MapMatching mapMatching = new MapMatching(hopper, opts);
mapMatching.setTransitionProbabilityBeta(args.getDouble("transition_probability_beta"));
mapMatching.setMeasurementErrorSigma(args.getInt("gps_accuracy"));

代码示例来源:origin: charite/jannovar

threshFiltMaxCov = args.getInt("gt_thresh_filt_max_cov");
threshFiltMinGtGq = args.getInt("gt_thresh_filt_min_gq");
threshFiltMinGtAafHet = args.getDouble("gt_thresh_filt_min_aaf_het");
threshFiltMaxGtAafHet = args.getDouble("gt_thresh_filt_max_aaf_het");
threshFiltMinGtAafHomAlt = args.getDouble("gt_thresh_filt_min_aaf_hom_alt");
threshFiltMaxGtAafHomRef = args.getDouble("gt_thresh_filt_max_aaf_hom_ref");
threshFiltMaxAlleleFrequencyAd = args.getDouble("var_thresh_max_allele_freq_ad");
threshFiltMaxAlleleFrequencyAr = args.getDouble("var_thresh_max_allele_freq_ar");
threshFiltMaxExacHomAlt = args.getInt("var_thresh_max_hom_alt_exac");
threshFiltMaxThousandGenomesHomAlt = args.getInt("var_thresh_max_hom_alt_g1k");

相关文章