/** * Gets the current settings of the filter. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> options = new Vector<String>(); if (getReplaceMissingValues()) { options.add("-M"); } if (getPercent() <= 0) { options.add("-N"); options.add("" + getNumberOfAttributes()); } else { options.add("-P"); options.add("" + getPercent()); } options.add("-R"); options.add("" + getSeed()); SelectedTag t = getDistribution(); options.add("-D"); options.add("" + t.getSelectedTag().getReadable()); return options.toArray(new String[0]); }
/** * Gets the current settings of the filter. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> options = new Vector<String>(); if (getReplaceMissingValues()) { options.add("-M"); } if (getPercent() <= 0) { options.add("-N"); options.add("" + getNumberOfAttributes()); } else { options.add("-P"); options.add("" + getPercent()); } options.add("-R"); options.add("" + getSeed()); SelectedTag t = getDistribution(); options.add("-D"); options.add("" + t.getSelectedTag().getReadable()); return options.toArray(new String[0]); }