Java.problem
Class Range

java.lang.Object
  extended by Java.problem.Range

public class Range
extends java.lang.Object

Description of a range with lower and upper bounds, and an initial guess

Since:
1.0

Constructor Summary
Range()
           
Range(double lb, double ub)
           
Range(double lb, double ub, double ig)
           
 
Method Summary
 double getInitialGuess()
          Get initial guess, a value taken from the range
 double getLowerBound()
          Get lower bound of the range
 double getUpperBound()
          Get upper bound of the range
 int read(java.lang.String[] commands, java.io.BufferedReader in, int line_no, int debug)
          Read range from input file in form of a buffered reader
 java.lang.String toString()
          Get string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Range

public Range()

Range

public Range(double lb,
             double ub)
Parameters:
lb - lower bound
ub - upper bound

Range

public Range(double lb,
             double ub,
             double ig)
Parameters:
lb - lower bound
ub - upper bound
ig - initial guesss
Method Detail

read

public int read(java.lang.String[] commands,
                java.io.BufferedReader in,
                int line_no,
                int debug)
Read range from input file in form of a buffered reader

Parameters:
commands - vector of strings on first line to read
in - buffered reader
line_no - current line in the buffered reader (i.e., problem file)
debug - debug level

getLowerBound

public double getLowerBound()
Get lower bound of the range

Returns:
the lower bound

getUpperBound

public double getUpperBound()
Get upper bound of the range

Returns:
the upper bound

getInitialGuess

public double getInitialGuess()
Get initial guess, a value taken from the range

Returns:
the guess

toString

public java.lang.String toString()
Get string representation

Overrides:
toString in class java.lang.Object
Returns:
the string