<commit_before>/*
 *  ******************************************************************************
 *  *
 *  *
 *  * This program and the accompanying materials are made available under the
 *  * terms of the Apache License, Version 2.0 which is available at
 *  * https://www.apache.org/licenses/LICENSE-2.0.
 *  *
 *  *  See the NOTICE file distributed with this work for additional
 *  *  information regarding copyright ownership.
 *  * Unless required by applicable law or agreed to in writing, software
 *  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 *  * License for the specific language governing permissions and limitations
 *  * under the License.
 *  *
 *  * SPDX-License-Identifier: Apache-2.0
 *  *****************************************************************************
 */

package org.nd4j.linalg.indexing.conditions;

import org.nd4j.linalg.factory.Nd4j;

public class Conditions {

    private Conditions() {}

    public enum ConditionMode {
        EPSILON_EQUALS(0), //0
        EPSILON_NOT_EQUALS(1), //1
        LESS_THAN(2), //2
        GREATER_THAN(3), //3
        LESS_THAN_OR_EQUAL(4), //4
        GREATER_THAN_OR_EQUAL(5), //5
        ABS_LESS_THAN(6), //6
        ABS_GREATER_THAN(7), //7
        IS_INFINITE(8), //8
        IS_NAN(9), //9
        ABS_EQUALS(10), //10
        NOT_EQUALS(11), //11
        ABS_GREATER_OR_EQUAL(12), //12
        ABS_LESS_THAN_OR_EQUAL(13), //13
        IS_FINITE(14), //14
        NOT_FINITE(15), //15
        AGGREGATE(-1); // this is an aggregate enum for or, and, not, and other indirect conditions that depend on others


        public final int index;
        ConditionMode(int index) {
            this.index = index;
        }

        public static ConditionMode fromNumber(int index) {
            switch(index) {
                case 0: return EPSILON_EQUALS;
                case 1: return EPSILON_NOT_EQUALS;
                case 2: return LESS_THAN;
                case 3: return GREATER_THAN;
                case 4: return LESS_THAN_OR_EQUAL;
                case 5: return GREATER_THAN_OR_EQUAL;
                case 6: return ABS_LESS_THAN;
                case 7: return ABS_GREATER_THAN;
                case 8: return IS_INFINITE;
                case 9: return IS_NAN;<commit_msg>Update Conditions.java<commit_after>/*
 *  ******************************************************************************
 *  *
 *  *
 *  * This program and the accompanying materials are made available under the
 *  * terms of the Apache License, Version 2.0 which is available at
 *  * https://www.apache.org/licenses/LICENSE-2.0.
 *  *
 *  *  See the NOTICE file distributed with this work for additional
 *  *  information regarding copyright ownership.
 *  * Unless required by applicable law or agreed to in writing, software
 *  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 *  * License for the specific language governing permissions and limitations
 *  * under the License.
 *  *
 *  * SPDX-License-Identifier: Apache-2.0
 *  *****************************************************************************
 */

package org.nd4j.linalg.indexing.conditions;

import org.nd4j.linalg.factory.Nd4j;

public class Conditions {

    private Conditions() {}

    public enum ConditionMode {
        EPSILON_EQUALS(0),
        EPSILON_NOT_EQUALS(1),
        LESS_THAN(2),
        GREATER_THAN(3),
        LESS_THAN_OR_EQUAL(4),
        GREATER_THAN_OR_EQUAL(5),
        ABS_LESS_THAN(6),
        ABS_GREATER_THAN(7),
        IS_INFINITE(8),
        IS_NAN(9),
        ABS_EQUALS(10),
        NOT_EQUALS(11),
        ABS_GREATER_OR_EQUAL(12),
        ABS_LESS_THAN_OR_EQUAL(13),
        IS_FINITE(14),
        NOT_FINITE(15), 
        AGGREGATE(-1); // this is an aggregate enum for or, and, not, and other indirect conditions that depend on others


        public final int index;
        ConditionMode(int index) {
            this.index = index;
        }

        public static ConditionMode fromNumber(int index) {
            switch(index) {
                case 0: return EPSILON_EQUALS;
                case 1: return EPSILON_NOT_EQUALS;
                case 2: return LESS_THAN;
                case 3: return GREATER_THAN;
                case 4: return LESS_THAN_OR_EQUAL;
                case 5: return GREATER_THAN_OR_EQUAL;
                case 6: return ABS_LESS_THAN;
                case 7: return ABS_GREATER_THAN;
                case 8: return IS_INFINITE;
                case 9: return IS_NAN;
{'fraction_non_alphanumeric': 0.14549702633814784, 'fraction_numerical': 0.022514868309260833, 'mean_word_length': 2.402456647398844, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6278268', 'n_tokens_mistral': 1482, 'n_tokens_neox': 1366, 'n_words': 390}