setKDTree((KDTree) Utils.forName(KDTree.class, funcName, funcSpec));
setDistanceF((DistanceFunction) Utils.forName(DistanceFunction.class, funcName, funcSpec));
  public void setOptions(String[] options)    throws Exception {    String optionString = Utils.getOption('I', options);    if (optionString.length() != 0) {      setMaxIterations(Integer.parseInt(optionString));    }    optionString = Utils.getOption('M', options);    if (optionString.length() != 0) {      setMaxKMeans(Integer.parseInt(optionString));    }    optionString = Utils.getOption('J', options);    if (optionString.length() != 0) {      setMaxKMeansForChildren(Integer.parseInt(optionString));    }    optionString = Utils.getOption('L', options);    if (optionString.length() != 0) {      setMinNumClusters(Integer.parseInt(optionString));    }    optionString = Utils.getOption('H', options);    if (optionString.length() != 0) {      setMaxNumClusters(Integer.parseInt(optionString));    }    optionString = Utils.getOption('B', options);    if (optionString.length() != 0) {      setBinValue(Double.parseDouble(optionString));    }    String funcString = Utils.getOption('K', options);    if (funcString.length() != 0) {      String [] funcSpec = Utils.splitOptions(funcString);      if (funcSpec.length == 0) {	throw new Exception("Invalid function specification string");      }      String funcName = funcSpec[0];      funcSpec[0] = "";      setKDTree((KDTree) Utils.forName(KDTree.class, funcName, funcSpec));    }   optionString = Utils.getOption('C', options);    if (optionString.length() != 0) {      setCutOffFactor(Double.parseDouble(optionString));    }    funcString = Utils.getOption('D', options);    if (funcString.length() != 0) {      String [] funcSpec = Utils.splitOptions(funcString);      if (funcSpec.length == 0) {	throw new Exception("Invalid function specification string");      }      String funcName = funcSpec[0];      funcSpec[0] = "";      setDistanceF((EuclideanDistance) Utils.forName(EuclideanDistance.class,						    funcName, funcSpec));    }     optionString  = Utils.getOption('N', options);    if (optionString.length() != 0) {      setInputCenterFile(optionString);      m_CenterInput = 	new BufferedReader(new FileReader(optionString));    }    optionString  = Utils.getOption('O', options);    if (optionString.length() != 0) {      setOutputCenterFile(optionString);      m_CenterOutput = new PrintWriter(new FileOutputStream(optionString));    }    optionString = Utils.getOption('U', options);    int debugLevel = 0;    if (optionString.length() != 0) {      try {	debugLevel = Integer.parseInt(optionString);      } catch (NumberFormatException e) {	throw new Exception(optionString +                            "is an illegal value for option -U");       }    }    setDebugLevel(debugLevel);    optionString  = Utils.getOption('Y', options);    if (optionString.length() != 0) {      setDebugVektorsFile(optionString);    }        super.setOptions(options);  }