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

com.meliorbis.numerics.generic.primitives.DoubleReduction 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 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_);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy