/** * Main method for testing this class. * * @param args the options */ public static void main(String[] args) { try { if (args.length == 0) { throw new Exception("The first argument must be the name of a " + "clusterer"); } String ClustererString = args[0]; args[0] = ""; Clusterer newClusterer = AbstractClusterer.forName(ClustererString, null); System.out.println(evaluateClusterer(newClusterer, args)); } catch (Exception e) { System.out.println(e.getMessage()); } } }
/** * Main method for testing this class. * * @param args the options */ public static void main(String[] args) { try { if (args.length == 0) { throw new Exception("The first argument must be the name of a " + "clusterer"); } String ClustererString = args[0]; args[0] = ""; Clusterer newClusterer = AbstractClusterer.forName(ClustererString, null); System.out.println(evaluateClusterer(newClusterer, args)); } catch (Exception e) { System.out.println(e.getMessage()); } } }
/** * Parses a given list of options. * * @param options the list of options as an array of strings * @throws Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { String tmpStr; tmpStr = Utils.getOption('W', options); super.setOptions(options); if (tmpStr.length() > 0) { setClusterer(AbstractClusterer.forName(tmpStr, null)); setClusterer(AbstractClusterer.forName(tmpStr, Utils.partitionOptions(options))); } else { setClusterer(AbstractClusterer.forName(defaultClustererString(), null)); setClusterer(AbstractClusterer.forName(defaultClustererString(), Utils.partitionOptions(options))); } }
/** * Parses a given list of options. * * @param options the list of options as an array of strings * @throws Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { String tmpStr; tmpStr = Utils.getOption('W', options); super.setOptions(options); if (tmpStr.length() > 0) { setClusterer(AbstractClusterer.forName(tmpStr, null)); setClusterer(AbstractClusterer.forName(tmpStr, Utils.partitionOptions(options))); } else { setClusterer(AbstractClusterer.forName(defaultClustererString(), null)); setClusterer(AbstractClusterer.forName(defaultClustererString(), Utils.partitionOptions(options))); } }
setClusterer(AbstractClusterer.forName(tmpStr, tmpOptions));
setClusterer(AbstractClusterer.forName(tmpStr, tmpOptions));
setClusterer((DensityBasedClusterer) AbstractClusterer.forName(cName, null)); if (getClusterer() instanceof OptionHandler) { ((OptionHandler) getClusterer()).setOptions(Utils
setClusterer((DensityBasedClusterer) AbstractClusterer.forName(cName, null)); if (getClusterer() instanceof OptionHandler) { ((OptionHandler) getClusterer()).setOptions(Utils
wString = defaultClustererString(); setClusterer(AbstractClusterer.forName(wString, Utils.partitionOptions(options)));
wString = defaultClustererString(); setClusterer(AbstractClusterer.forName(wString, Utils.partitionOptions(options)));