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

java.lang.Object
  extended by edu.jhu.bme.smile.commons.optimize.ProjectNDto1DOptimizable
All Implemented Interfaces:
Optimizable1DContinuous
Direct Known Subclasses:
ProjectNDto1DOptimizableDifferentiable

public class ProjectNDto1DOptimizable
extends java.lang.Object
implements Optimizable1DContinuous

Projects an ND function to 1D so that LineSearchND can optimize in one dimension at a time.

Author:
Hanlin Wan

Constructor Summary
ProjectNDto1DOptimizable(OptimizableNDContinuous func)
          Constructor to create the projected function
 
Method Summary
 double getDomainMax()
          Gets the domain maximum in the current dimension.
 double getDomainMin()
          Gets the domain minimum in the current dimension.
 double getDomainTolerance()
          Gets the tolerance.
 int getNumberOfDimensions()
          Gets the number of dimensions.
 double getValue(double x)
          Gets the value of the function evaluated at the current dimension of x
 void setCurrentDimension(int curDim)
          Sets the current dimension.
 void setCurrentLocation(double location)
          Sets the location of the current dimension
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectNDto1DOptimizable

public ProjectNDto1DOptimizable(OptimizableNDContinuous func)
Constructor to create the projected function

Parameters:
func - function to project
Method Detail

getDomainMax

public double getDomainMax()
Gets the domain maximum in the current dimension.

Specified by:
getDomainMax in interface Optimizable1DContinuous
Returns:
domain max

getDomainMin

public double getDomainMin()
Gets the domain minimum in the current dimension.

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 value of the function evaluated at the current dimension of x

Specified by:
getValue in interface Optimizable1DContinuous
Parameters:
x - value in the current dimension to evaluate at
Returns:
the value

setCurrentLocation

public void setCurrentLocation(double location)
Sets the location of the current dimension

Parameters:
location - new location to be set

setCurrentDimension

public void setCurrentDimension(int curDim)
Sets the current dimension.

Parameters:
curDim - current dimension

getNumberOfDimensions

public int getNumberOfDimensions()
Gets the number of dimensions.

Returns:
number of dimensions