* Key: {@code -sample.n} *
*/ public static final OptionID N_ID = new OptionID("sample.n", "The number of samples to draw."); /** * Parameter to specify the sample size. ** Key: {@code -sample.random} *
*/ public static final OptionID RANDOM_ID = new OptionID("sample.random", "Random generator seed."); /** * Sample size. */ protected int samplesize; /** * Random generator. */ protected RandomFactory rnd; @Override protected void makeOptions(Parameterization config) { super.makeOptions(config); IntParameter samplesizeP = new IntParameter(N_ID)// .addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT); if(config.grab(samplesizeP)) { samplesize = samplesizeP.intValue(); } RandomParameter randomP = new RandomParameter(RANDOM_ID); if(config.grab(randomP)) { rnd = randomP.getValue(); } } @Override protected RandomSampleReferencePoints makeInstance() { return new RandomSampleReferencePoints(samplesize, rnd); } } }