com.meliorbis.numerics.generic.primitives.DoubleReduction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Numerics Show documentation
Show all versions of Numerics Show documentation
A library for working with large multi-dimensional arrays and the functions they represent
/**
*
*/
package com.meliorbis.numerics.generic.primitives;
import com.meliorbis.numerics.NumericsException;
import com.meliorbis.numerics.generic.SettableIterator;
import com.meliorbis.numerics.generic.impl.Reduction;
/**
* Primitive double specialisation of IReduction
*
* @author Tobias Grasl
*/
public interface DoubleReduction extends Reduction
{
double perform(DoubleSettableIterator iterator_) throws E;
default Double perform(SettableIterator iterator_) throws E
{
if(!(iterator_ instanceof DoubleSettableIterator))
{
throw new NumericsException("Calling primitive reduction with non-primitive iterator");
}
return perform((DoubleSettableIterator)iterator_);
}
}