public class Spectrum
extends java.lang.Object
Constructor and Description |
---|
Spectrum(double lb,
double ub)
Creates a new spectrum
|
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
equals(Spectrum spec)
Compares the spectrum to the one passed as parameter
|
double |
getLowerBound() |
double |
getUpperBound() |
java.lang.Boolean |
has(double num)
Checks if a number is in the spectrum
|
java.lang.Boolean |
has(Opinion o)
Checks if an opinion value is in the spectrum
|
double |
middle()
Returns the middle point of the spectrum
|
void |
setLowerBound(double lowerBound) |
void |
setUpperBound(double upperBound) |
double |
symmetric(double x)
Returns the symmetric of a point in the spectrum about the middle of the spectrum
|
java.lang.String |
toString() |
public Spectrum(double lb, double ub)
lb
- the lower bound of the spectrumub
- the upper bound of the spectrumpublic java.lang.Boolean equals(Spectrum spec)
spec
- the spectrum to comparepublic double middle()
public java.lang.Boolean has(double num)
num
- the number to checkpublic java.lang.Boolean has(Opinion o)
o
- the opinion to checkpublic double symmetric(double x)
x
- the point the symmetric has to be computedpublic java.lang.String toString()
toString
in class java.lang.Object
public double getUpperBound()
public void setUpperBound(double upperBound)
public double getLowerBound()
public void setLowerBound(double lowerBound)