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

org.tensorics.core.functional.Func1 Maven / Gradle / Ivy

Go to download

Tensorics is a java framework which uses a tensor as a central object. A tensor represents a set of values placed in an N-dimensional space. Wherever you are tempted to use maps of maps, a tensor might be a good choice ;-) Tensorics provides methods to create, transform and performing calculations with those tensors.

There is a newer version: 0.0.81
Show newest version
/**
 * Copyright (c) 2016 European Organisation for Nuclear Research (CERN), All Rights Reserved.
 */

package org.tensorics.core.functional;

/**
 * Represents a function with one argument.
 * 
 * @param  the first argument type
 * @param  the result type
 */
@FunctionalInterface
public interface Func1 extends FiniteArgumentFunction {
    
    R apply(T t);

    @Override
    @SuppressWarnings("unchecked")
    default FuncN toFuncN() {
        return args -> apply((T) args[0]);
    }

    @Override
    default int numberOfArgs() {
        return 1;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy