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

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

public class MinToMax1D
extends java.lang.Object
implements Optimizable1DContinuous

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

Author:
Hanlin Wan

Constructor Summary
MinToMax1D(Optimizable1DContinuous func)
          Constructor to create the negated function
 
Method Summary
 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

MinToMax1D

public MinToMax1D(Optimizable1DContinuous func)
Constructor to create the negated function

Parameters:
func - function to negate
Method Detail

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