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

com.meliorbis.numerics.generic.primitives.DoubleMultiValuedNaryOp Maven / Gradle / Ivy

Go to download

A library for working with large multi-dimensional arrays and the functions they represent

There is a newer version: 1.2
Show newest version
/**
 * 
 */
package com.meliorbis.numerics.generic.primitives;

import org.apache.commons.lang.ArrayUtils;

import com.meliorbis.numerics.generic.MultiValuedNaryOp;

/**
 * @author Tobias Grasl
 */
@FunctionalInterface
public interface DoubleMultiValuedNaryOp extends MultiValuedNaryOp
{
	/**
     * Perform the operation on the provided inputs and return the result
     *
     * @param inputs_ The inputs to perform the operation on
     *
     * @return The result of the operation
     * 
     * @throws E If the operation fails
     */
    default Double[] perform(Double... inputs_) throws E
    {
        // TODO: Might want to put a warning here to ensure it is not called inadvertently
        return ArrayUtils.toObject(perform(ArrayUtils.toPrimitive(inputs_)));
    }
    
    double[] perform(double... inputs_) throws E;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy