net.finmath.integration.AbstractRealIntegral Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finmath-lib Show documentation
Show all versions of finmath-lib Show documentation
finmath lib is a Mathematical Finance Library in Java.
It provides algorithms and methodologies related to mathematical finance.
/*
* (c) Copyright Christian P. Fries, Germany. Contact: [email protected].
*
* Created on 23.03.2014
*/
package net.finmath.integration;
import java.util.function.DoubleUnaryOperator;
/**
* A real integral with lower and upper integration bounds.
*
* @author Christian Fries
* @version 1.0
*/
public abstract class AbstractRealIntegral implements RealIntegral {
private final double lowerBound;
private final double upperBound;
/**
* Create a real integral with lower and upper integration bounds.
*
* @param lowerBound Lower integration bound.
* @param upperBound Upper integration bound.
*/
public AbstractRealIntegral(final double lowerBound, final double upperBound) {
super();
this.lowerBound = lowerBound;
this.upperBound = upperBound;
}
/**
* Get the lower integration bound.
*
* @return the lower integration bound.
*/
public double getLowerBound() {
return lowerBound;
}
/**
* Get the upper integration bound.
*
* @return the upper integration bound.
*/
public double getUpperBound() {
return upperBound;
}
/* (non-Javadoc)
* @see net.finmath.integration.RealIntegral#integrate(java.util.function.DoubleUnaryOperator)
*/
@Override
public abstract double integrate(DoubleUnaryOperator integrand);
}