Example usage for java.util.function IntToDoubleFunction applyAsDouble

List of usage examples for java.util.function IntToDoubleFunction applyAsDouble

Introduction

In this page you can find the example usage for java.util.function IntToDoubleFunction applyAsDouble.

Prototype

double applyAsDouble(int value);

Source Link

Document

Applies this function to the given argument.

Usage

From source file:org.briljantframework.array.AbstractIntArray.java

@Override
public DoubleArray mapToDouble(IntToDoubleFunction function) {
    DoubleArray matrix = factory.newDoubleArray(getShape());
    for (int i = 0; i < size(); i++) {
        matrix.set(i, function.applyAsDouble(get(i)));
    }/*from  w  w w  .  jav a 2 s  . c  om*/
    return matrix;
}