1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 package org.apache.commons.statistics.examples.distribution; 18 19 import java.io.File; 20 import picocli.CommandLine.Option; 21 22 /** 23 * Standard options for distribution commands. 24 */ 25 class DistributionOptions { 26 27 /** The distribution function. */ 28 protected DistributionFunction distributionFunction; 29 30 /** The field delimiter. */ 31 @Option(names = { "--delim" }, 32 description = {"Output field delimiter (default: \\t)."}) 33 protected String delim = "\t"; 34 35 /** The output file. */ 36 @Option(names = { "--out" }, 37 paramLabel = "file", 38 description = {"Output file (default: stdout)."}) 39 protected File outputFile; 40 41 /** The output file. */ 42 @Option(names = { "--in" }, 43 paramLabel = "file", 44 description = {"Input file containing points to evaluate.", 45 "Overrides configured ranges."}) 46 protected File inputFile; 47 48 /** Flag indicating if an exception should be suppressed during function evaluation. 49 * Exceptions are thrown by the ICDF and ISF functions when the input probability is not in 50 * the interval {@code [0, 1]}. */ 51 @Option(names = { "--no-ex", "--no-exception" }, 52 description = {"Suppress function evaluation exceptions (returns NaN or integer min value)."}) 53 protected boolean suppressException; 54 }