All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nd4j.linalg.indexing.conditions.IsInfinite Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.nd4j.linalg.indexing.conditions;

import org.nd4j.linalg.api.complex.IComplexNumber;

/**
 * Returns true when the given number is infinite
 * @author Adam Gibson
 */
public class IsInfinite implements Condition {
    @Override
    public Boolean apply(Number input) {
        return Double.isInfinite(input.doubleValue());
    }

    @Override
    public Boolean apply(IComplexNumber input) {
        return Double.isInfinite(input.absoluteValue().doubleValue());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy