ru.sstu.math.optim
Class Interval

java.lang.Object
  extended by ru.sstu.math.optim.Interval
All Implemented Interfaces:
Constraint

public class Interval
extends Object
implements Constraint

Interval class represents 1-dimensional interval.

Since:
Math 1.0
Author:
Denis A. Murashev

Constructor Summary
Interval(double min, double max)
          Creating interval with given values.
 
Method Summary
 boolean checkPoint(double[] point)
          Checks if given point matches constraint.
 double getMax()
           
 double getMin()
           
 double getWidth()
           
 void setMax(double max)
          Sets maximum value.
 void setMin(double min)
          Sets minimal value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interval

public Interval(double min,
                double max)
Creating interval with given values.

Parameters:
min - minimal value
max - maximum value
Method Detail

getMin

public double getMin()
Returns:
minimal value

setMin

public void setMin(double min)
Sets minimal value.

Parameters:
min - minimal value

getMax

public double getMax()
Returns:
maximum value

setMax

public void setMax(double max)
Sets maximum value.

Parameters:
max - maximum value

getWidth

public double getWidth()
Returns:
the width of interval

checkPoint

public boolean checkPoint(double[] point)
Checks if given point matches constraint.

Specified by:
checkPoint in interface Constraint
Parameters:
point - point to check
Returns:
true if point does not satisfies the constraint


Copyright © 2011 TFI branch of Engels Instutute of Technology. All Rights Reserved.