weka.core.Utils.joinOptions()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(125)

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

Utils.joinOptions介绍

[英]Joins all the options in an option array into a single string, as might be used on the command line.
[中]将选项数组中的所有选项合并为一个字符串,这可能会在命令行中使用。

代码示例

代码示例来源:origin: nz.ac.waikato.cms.weka/distributedWekaBase

/**
 * Create an option specification string for a filter
 * 
 * @param f the filter
 * @return the option spec
 */
protected String getFilterSpec(Filter f) {
 return f.getClass().getName()
  + (f instanceof OptionHandler ? " "
   + Utils.joinOptions(((OptionHandler) f).getOptions()) : "");
}

代码示例来源:origin: nz.ac.waikato.cms.weka/distributedWekaBase

/**
 * Create an option specification string for a filter
 * 
 * @param f the filter
 * @return the option spec
 */
public static String getFilterSpec(Filter f) {
 return f.getClass().getName()
  + (f instanceof OptionHandler ? " "
   + Utils.joinOptions(((OptionHandler) f).getOptions()) : "");
}

代码示例来源:origin: nz.ac.waikato.cms.moa/moa

@Override
public String getValueAsCLIString() {
  if ((this.currentValue == null) && (this.nullString != null)) {
    return this.nullString;
  }
  
  String result = currentValue.getClass().getName();
  if (currentValue instanceof weka.core.OptionHandler)
    result += " " + Utils.joinOptions(((weka.core.OptionHandler) currentValue).getOptions());
  result = result.trim();
  
  return result;
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

private String statusMessagePrefix() {
  return getCustomName()
   + "$"
   + hashCode()
   + "|"
   + ((m_Filter instanceof OptionHandler && Utils.joinOptions(
    ((OptionHandler) m_Filter).getOptions()).length() > 0) ? Utils
    .joinOptions(((OptionHandler) m_Filter).getOptions()) + "|" : "");
 }
}

代码示例来源:origin: net.sf.meka/meka

/**
 * Returns the commandline of the given object.
 *
 * @param obj        the object to create the commandline for
 * @return        the commandline
 */
public String getCommandline(Object obj) {
  String    result;
  result = obj.getClass().getName();
  if (obj instanceof OptionHandler)
    result += " " + Utils.joinOptions(((OptionHandler) obj).getOptions());
  return result.trim();
}

代码示例来源:origin: com.github.fracpete/multisearch-weka-package

/**
 * Returns the commandline of the given object.
 *
 * @param obj        the object to create the commandline for
 * @return        the commandline
 */
public String getCommandline(Object obj) {
 String    result;
 result = obj.getClass().getName();
 if (obj instanceof OptionHandler)
  result += " " + Utils.joinOptions(((OptionHandler) obj).getOptions());
 return result.trim();
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

private String statusMessagePrefix() {
 return getCustomName()
  + "$"
  + hashCode()
  + "|"
  + ((m_ClassifierTemplate instanceof OptionHandler && Utils.joinOptions(
   ((OptionHandler) m_ClassifierTemplate).getOptions()).length() > 0) ? Utils
   .joinOptions(((OptionHandler) m_ClassifierTemplate).getOptions()) + "|"
   : "");
}

代码示例来源:origin: Waikato/meka

/**
 * Returns the commandline of the given object.
 *
 * @param obj        the object to create the commandline for
 * @return        the commandline
 */
public String getCommandline(Object obj) {
  String    result;
  result = obj.getClass().getName();
  if (obj instanceof OptionHandler)
    result += " " + Utils.joinOptions(((OptionHandler) obj).getOptions());
  return result.trim();
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

protected String makeClustererSpec(weka.clusterers.Clusterer clusterer) {
  String clusterSpec = clusterer.getClass().getCanonicalName();
  clusterSpec = clusterSpec.substring(clusterSpec.lastIndexOf('.') + 1,
   clusterSpec.length());

  String opts = " ";
  if (clusterer instanceof OptionHandler) {
   opts = Utils.joinOptions(((OptionHandler) clusterer).getOptions());
  }

  return clusterSpec + opts;
 }
}

代码示例来源:origin: Waikato/weka-trunk

private String statusMessagePrefix() {
  return getCustomName()
   + "$"
   + hashCode()
   + "|"
   + ((m_Clusterer instanceof OptionHandler && Utils.joinOptions(
    ((OptionHandler) m_Clusterer).getOptions()).length() > 0) ? Utils
    .joinOptions(((OptionHandler) m_Clusterer).getOptions()) + "|" : "");
 }
}

代码示例来源:origin: Waikato/weka-trunk

private String statusMessagePrefix() {
  return getCustomName()
   + "$"
   + hashCode()
   + "|"
   + ((m_Filter instanceof OptionHandler && Utils.joinOptions(
    ((OptionHandler) m_Filter).getOptions()).length() > 0) ? Utils
    .joinOptions(((OptionHandler) m_Filter).getOptions()) + "|" : "");
 }
}

代码示例来源:origin: Waikato/weka-trunk

protected String makeClustererSpec(weka.clusterers.Clusterer clusterer) {
  String clusterSpec = clusterer.getClass().getCanonicalName();
  clusterSpec = clusterSpec.substring(clusterSpec.lastIndexOf('.') + 1,
   clusterSpec.length());

  String opts = " ";
  if (clusterer instanceof OptionHandler) {
   opts = Utils.joinOptions(((OptionHandler) clusterer).getOptions());
  }

  return clusterSpec + opts;
 }
}

代码示例来源:origin: Waikato/weka-trunk

protected String makeSchemeSpec(Object scheme, int setNum, int maxSetNum) {
 String name = scheme.getClass().getCanonicalName();
 name = name.substring(name.lastIndexOf('.') + 1, name.length());
 if (scheme instanceof OptionHandler) {
  name += " " + Utils.joinOptions(((OptionHandler) scheme).getOptions());
 }
 if (maxSetNum != 1) {
  name += " (set " + setNum + " of " + maxSetNum + ")";
 }
 return name;
}

代码示例来源:origin: Waikato/weka-trunk

private String statusMessagePrefix() {
 return getCustomName()
  + "$"
  + hashCode()
  + "|"
  + ((m_ClassifierTemplate instanceof OptionHandler && Utils.joinOptions(
   ((OptionHandler) m_ClassifierTemplate).getOptions()).length() > 0) ? Utils
   .joinOptions(((OptionHandler) m_ClassifierTemplate).getOptions()) + "|"
   : "");
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

private String statusMessagePrefix() {
  return getCustomName()
   + "$"
   + hashCode()
   + "|"
   + ((m_Associator instanceof OptionHandler && Utils.joinOptions(
    ((OptionHandler) m_Associator).getOptions()).length() > 0) ? Utils
    .joinOptions(((OptionHandler) m_Associator).getOptions()) + "|" : "");
 }
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

private String statusMessagePrefix() {
  return getCustomName()
   + "$"
   + hashCode()
   + "|"
   + ((m_Clusterer instanceof OptionHandler && Utils.joinOptions(
    ((OptionHandler) m_Clusterer).getOptions()).length() > 0) ? Utils
    .joinOptions(((OptionHandler) m_Clusterer).getOptions()) + "|" : "");
 }
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

protected String makeSchemeSpec(Object scheme, int setNum, int maxSetNum) {
 String name = scheme.getClass().getCanonicalName();
 name = name.substring(name.lastIndexOf('.') + 1, name.length());
 if (scheme instanceof OptionHandler) {
  name += " " + Utils.joinOptions(((OptionHandler) scheme).getOptions());
 }
 if (maxSetNum != 1) {
  name += " (set " + setNum + " of " + maxSetNum + ")";
 }
 return name;
}

代码示例来源:origin: Waikato/weka-trunk

private String statusMessagePrefix() {
  return getCustomName()
   + "$"
   + hashCode()
   + "|"
   + ((m_Associator instanceof OptionHandler && Utils.joinOptions(
    ((OptionHandler) m_Associator).getOptions()).length() > 0) ? Utils
    .joinOptions(((OptionHandler) m_Associator).getOptions()) + "|" : "");
 }
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

private String statusMessagePrefix() {
 return getCustomName()
  + "$"
  + hashCode()
  + "|"
  + ((m_Saver instanceof OptionHandler) ? Utils
   .joinOptions(((OptionHandler) m_Saver).getOptions()) + "|" : "");
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Gets the classifier specification string, which contains the class name of
 * the classifier and any options to the classifier
 * 
 * @return the classifier string
 */
protected String getIterativeClassifierSpec() {
 IterativeClassifier c = getIterativeClassifier();
 return c.getClass().getName() + " "
  + Utils.joinOptions(((OptionHandler) c).getOptions());
}

相关文章