edu.jhu.bme.smile.commons.optimize
Class MinToMax1DDifferentiable

java.lang.Object
  extended by edu.jhu.bme.smile.commons.optimize.MinToMax1DDifferentiable
All Implemented Interfaces:
Optimizable1DContinuous, Optimizable1DContinuousDifferentiable

public class MinToMax1DDifferentiable
extends java.lang.Object
implements Optimizable1DContinuousDifferentiable

Finds the maximum of Diffentiable 1D functions by negating the function and finding the minimum.

Author:
Hanlin Wan

Constructor Summary
MinToMax1DDifferentiable(Optimizable1DContinuousDifferentiable func)
          Constructor to create the negated function
 
Method Summary
 double get2ndDerivative(double x)
          Gets the negated second derivative
 double getDerivative(double x)
          Gets the negated derivative
 double getDomainMax()
          Gets the domain maximum
 double getDomainMin()
          Gets the domain minimum
 double getDomainTolerance()
          Gets the tolerance
 double getValue(double x)
          Gets the negated value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinToMax1DDifferentiable

public MinToMax1DDifferentiable(Optimizable1DContinuousDifferentiable func)
Constructor to create the negated function

Parameters:
func - function to negate
Method Detail

get2ndDerivative

public double get2ndDerivative(double x)
Gets the negated second derivative

Specified by:
get2ndDerivative in interface Optimizable1DContinuousDifferentiable
Parameters:
x - location to calculate derivative
Returns:
the negated second derivative

getDerivative

public double getDerivative(double x)
Gets the negated derivative

Specified by:
getDerivative in interface Optimizable1DContinuousDifferentiable
Parameters:
x - location to calculate derivative
Returns:
the negated derivative

getDomainMax

public double getDomainMax()
Gets the domain maximum

Specified by:
getDomainMax in interface Optimizable1DContinuous
Returns:
domain max

getDomainMin

public double getDomainMin()
Gets the domain minimum

Specified by:
getDomainMin in interface Optimizable1DContinuous
Returns:
domain min

getDomainTolerance

public double getDomainTolerance()
Gets the tolerance

Specified by:
getDomainTolerance in interface Optimizable1DContinuous
Returns:
tolerance

getValue

public double getValue(double x)
Gets the negated value

Specified by:
getValue in interface Optimizable1DContinuous
Parameters:
x - location to get value at
Returns:
negated value at location x