/** * Parses a given list of options. Valid options are: * * <p> * * @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('S', options); if (tmpStr.length() != 0) { setSeed(Integer.parseInt(tmpStr)); } else { setSeed(m_SeedDefault); } super.setOptions(options); }
/** * Parses a given list of options. Valid options are: * * <p>-W classname <br> * Specify the full class name of the clusterer to evaluate. * * <p>All option after -- will be passed to the classifier. * * @param options the list of options as an array of strings * @exception Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { m_NoSizeDetermination = Utils.getFlag("no-size", options); String cName = Utils.getOption('W', options); if (cName.length() == 0) { throw new Exception("A clusterer must be specified with" + " the -W option."); } // Do it first without options, so if an exception is thrown during // the option setting, listOptions will contain options for the actual // Classifier. setClusterer((DensityBasedClusterer) AbstractClusterer.forName(cName, null)); if (getClusterer() instanceof OptionHandler) { ((OptionHandler) getClusterer()).setOptions(Utils.partitionOptions(options)); updateOptions(); } }