Java 类weka.core.neighboursearch.balltrees.TopDownConstructor 实例源码

项目:repo.kmeanspp.silhouette_score    文件:BallTree.java   
/**
 * Parses a given list of options.
 * 
 <!-- options-start -->
 * Valid options are: <p/>
 * 
 * <pre> -C &lt;classname and options&gt;
 *  The construction method to employ. Either TopDown or BottomUp
 *  (default: weka.core.TopDownConstructor)</pre>
 * 
 <!-- options-end --> 
 * 
 * @param options   the list of options as an array of strings
 * @throws Exception    if an option is not supported
 */
public void setOptions(String[] options)
  throws Exception {

  super.setOptions(options);

  String optionString = Utils.getOption('C', options);
  if(optionString.length() != 0) {
    String constructorSpec[] = Utils.splitOptions(optionString);
    if(constructorSpec.length == 0) { 
      throw new Exception("Invalid BallTreeConstructor specification string."); 
    }
    String className = constructorSpec[0];
    constructorSpec[0] = "";

    setBallTreeConstructor( (BallTreeConstructor)
                          Utils.forName( BallTreeConstructor.class, 
                                         className, constructorSpec) );
  }
  else {
    setBallTreeConstructor(new TopDownConstructor());  
  }

  Utils.checkForRemainingOptions(options);
}
项目:autoweka    文件:BallTree.java   
/**
 * Parses a given list of options.
 * 
 <!-- options-start -->
 * Valid options are: <p/>
 * 
 * <pre> -C &lt;classname and options&gt;
 *  The construction method to employ. Either TopDown or BottomUp
 *  (default: weka.core.TopDownConstructor)</pre>
 * 
 <!-- options-end --> 
 * 
 * @param options   the list of options as an array of strings
 * @throws Exception    if an option is not supported
 */
public void setOptions(String[] options)
  throws Exception {

  super.setOptions(options);

  String optionString = Utils.getOption('C', options);
  if(optionString.length() != 0) {
    String constructorSpec[] = Utils.splitOptions(optionString);
    if(constructorSpec.length == 0) { 
      throw new Exception("Invalid BallTreeConstructor specification string."); 
    }
    String className = constructorSpec[0];
    constructorSpec[0] = "";

    setBallTreeConstructor( (BallTreeConstructor)
                          Utils.forName( BallTreeConstructor.class, 
                                         className, constructorSpec) );
  }
  else {
    setBallTreeConstructor(new TopDownConstructor());  
  }
}
项目:umple    文件:BallTree.java   
/**
 * Parses a given list of options.
 * 
 <!-- options-start -->
 * Valid options are: <p/>
 * 
 * <pre> -C &lt;classname and options&gt;
 *  The construction method to employ. Either TopDown or BottomUp
 *  (default: weka.core.TopDownConstructor)</pre>
 * 
 <!-- options-end --> 
 * 
 * @param options   the list of options as an array of strings
 * @throws Exception    if an option is not supported
 */
public void setOptions(String[] options)
  throws Exception {

  super.setOptions(options);

  String optionString = Utils.getOption('C', options);
  if(optionString.length() != 0) {
    String constructorSpec[] = Utils.splitOptions(optionString);
    if(constructorSpec.length == 0) { 
      throw new Exception("Invalid BallTreeConstructor specification string."); 
    }
    String className = constructorSpec[0];
    constructorSpec[0] = "";

    setBallTreeConstructor( (BallTreeConstructor)
                          Utils.forName( BallTreeConstructor.class, 
                                         className, constructorSpec) );
  }
  else {
    setBallTreeConstructor(new TopDownConstructor());  
  }

  Utils.checkForRemainingOptions(options);
}
项目:jbossBA    文件:BallTree.java   
/**
 * Parses a given list of options.
 * 
 <!-- options-start -->
 * Valid options are: <p/>
 * 
 * <pre> -C &lt;classname and options&gt;
 *  The construction method to employ. Either TopDown or BottomUp
 *  (default: weka.core.TopDownConstructor)</pre>
 * 
 <!-- options-end --> 
 * 
 * @param options   the list of options as an array of strings
 * @throws Exception    if an option is not supported
 */
public void setOptions(String[] options)
  throws Exception {

  super.setOptions(options);

  String optionString = Utils.getOption('C', options);
  if(optionString.length() != 0) {
    String constructorSpec[] = Utils.splitOptions(optionString);
    if(constructorSpec.length == 0) { 
      throw new Exception("Invalid BallTreeConstructor specification string."); 
    }
    String className = constructorSpec[0];
    constructorSpec[0] = "";

    setBallTreeConstructor( (BallTreeConstructor)
                          Utils.forName( BallTreeConstructor.class, 
                                         className, constructorSpec) );
  }
  else {
    setBallTreeConstructor(new TopDownConstructor());  
  }
}