Package org.sm.smtools.math
Class Extremum
java.lang.Object
org.sm.smtools.math.Extremum
public final class Extremum
extends java.lang.Object
The
Extremum
class provides a container for storing an extremum's index and value.
Note that this class cannot be subclassed!
- Version:
- 08/11/2012
- Author:
- Sven Maerivoet
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description int
getIndex()
Getter method for the extremum's index.double
getValue()
Getter method for the extremum's value.void
reset()
Resets the extremum.void
set(int index, double value)
General setter method for the extremum.void
setIndex(int index)
Setter method for the extremum's index.void
setValue(double value)
Setter method for the extremum's value.Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Extremum
public Extremum()Constructs an emptyExtremum
object. -
Extremum
public Extremum(int index, double value)Constructs an emptyExtremum
object.- Parameters:
index
- the extremum's indexvalue
- the extremum's value
-
-
Method Details
-
getIndex
public int getIndex()Getter method for the extremum's index.- Returns:
- the extremum's index
-
getValue
public double getValue()Getter method for the extremum's value.- Returns:
- the extremum's value
-
set
public void set(int index, double value)General setter method for the extremum.- Parameters:
index
- the extremum's indexvalue
- the extremum's value
-
setIndex
public void setIndex(int index)Setter method for the extremum's index.- Parameters:
index
- the extremum's index
-
setValue
public void setValue(double value)Setter method for the extremum's value.- Parameters:
value
- the extremum's value
-
reset
public void reset()Resets the extremum.
-