    001    /*
    002     * Licensed to the Apache Software Foundation (ASF) under one or more
    003     * contributor license agreements.  See the NOTICE file distributed with
    004     * this work for additional information regarding copyright ownership.
    005     * The ASF licenses this file to You under the Apache License, Version 2.0
    006     * (the "License"); you may not use this file except in compliance with
    007     * the License.  You may obtain a copy of the License at
    008     *
    009     *      http://www.apache.org/licenses/LICENSE-2.0
    010     *
    011     * Unless required by applicable law or agreed to in writing, software
    012     * distributed under the License is distributed on an "AS IS" BASIS,
    013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014     * See the License for the specific language governing permissions and
    015     * limitations under the License.
    016     */
    017
    018    package org.apache.commons.math.stat.ranking;
    019
    020    /**
    021     * Strategies for handling NaN values in rank transformations.
    022     * <ul>
    023     * <li>MINIMAL - NaNs are treated as minimal in the ordering, equivalent to
    024     * (that is, tied with) <code>Double.NEGATIVE_INFINITY</code>.</li>
    025     * <li>MAXIMAL - NaNs are treated as maximal in the ordering, equivalent to
    026     * <code>Double.POSITIVE_INFINITY</code></li>
    027     * <li>REMOVED - NaNs are removed before the rank transform is applied</li>
    028     * <li>FIXED - NaNs are left "in place," that is the rank transformation is
    029     * applied to the other elements in the input array, but the NaN elements
    030     * are returned unchanged.</li>
    031     * </ul>
    032     *
    033     * @since 2.0
    034     * @version $Revision: 811685 $ $Date: 2009-09-05 19:36:48 +0200 (sam. 05 sept. 2009) $
    035     */
    036    public enum NaNStrategy {
    037
    038        /** NaNs are considered minimal in the ordering */
    039        MINIMAL,
    040
    041        /** NaNs are considered maximal in the ordering */
    042        MAXIMAL,
    043
    044        /** NaNs are removed before computing ranks */
    045        REMOVED,
    046
    047        /** NaNs are left in place */
    048        FIXED
    049    }