public class ContinuousAlphabet extends Alphabet
Modifier and Type | Class and Description |
---|---|
static class |
ContinuousAlphabet.ContinuousAlphabetParameterSet
Class for the
ParameterSet of a
ContinuousAlphabet . |
Alphabet.AlphabetParameterSet<T extends Alphabet>
Constructor and Description |
---|
ContinuousAlphabet()
Creates a new
ContinuousAlphabet with minimum and maximum value
being -Double.MAX_VALUE and Double.MAX_VALUE ,
respectively. |
ContinuousAlphabet(boolean allowNaN)
Creates a new
ContinuousAlphabet with minimum and maximum value
being -Double.MAX_VALUE and Double.MAX_VALUE ,
respectively. |
ContinuousAlphabet(ContinuousAlphabet.ContinuousAlphabetParameterSet parameters)
The constructor for the
InstantiableFromParameterSet
interface. |
ContinuousAlphabet(double min,
double max)
Creates a new
ContinuousAlphabet from a minimal and a maximal
value. |
ContinuousAlphabet(double min,
double max,
boolean allowNaN)
Creates a new
ContinuousAlphabet from a minimal and a maximal
value. |
ContinuousAlphabet(StringBuffer xml)
The standard constructor for the interface
Storable . |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Alphabet a) |
ContinuousAlphabet.ContinuousAlphabetParameterSet |
getCurrentParameterSet()
Returns the
InstanceParameterSet that has been used to
instantiate the current instance of the implementing class. |
double |
getMax()
Returns the maximal value of this alphabet.
|
double |
getMin()
Returns the minimal value of the
Alphabet . |
boolean |
isEncodedSymbol(double candidat)
Indicates if
candidat is an element of the internal
interval. |
double |
length()
Returns the length of the
Alphabet . |
String |
toString() |
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
checkConsistency
public ContinuousAlphabet(ContinuousAlphabet.ContinuousAlphabetParameterSet parameters)
InstantiableFromParameterSet
interface. Creates a new ContinuousAlphabet
from a given set of
parameters.parameters
- the parameter set for the ContinuousAlphabet
InstantiableFromParameterSet
public ContinuousAlphabet(double min, double max) throws IllegalArgumentException
ContinuousAlphabet
from a minimal and a maximal
value. NaN values are not allowed.min
- the minimal valuemax
- the maximal valueIllegalArgumentException
- if the minimum or the maximum could not be setpublic ContinuousAlphabet(double min, double max, boolean allowNaN) throws IllegalArgumentException
ContinuousAlphabet
from a minimal and a maximal
value.min
- the minimal valuemax
- the maximal valueallowNaN
- true if NaN values are allowedIllegalArgumentException
- if the minimum or the maximum could not be setpublic ContinuousAlphabet()
ContinuousAlphabet
with minimum and maximum value
being -Double.MAX_VALUE
and Double.MAX_VALUE
,
respectively. NaN values are not allowed.IllegalArgumentException
- if the minimum or the maximum could not be setContinuousAlphabet(double, double)
public ContinuousAlphabet(boolean allowNaN)
ContinuousAlphabet
with minimum and maximum value
being -Double.MAX_VALUE
and Double.MAX_VALUE
,
respectively.allowNaN
- true if NaN values are allowedIllegalArgumentException
- if the minimum or the maximum could not be setContinuousAlphabet(double, double)
public ContinuousAlphabet(StringBuffer xml) throws NonParsableException
Storable
.
Creates a new ContinuousAlphabet
out of its XML representation.xml
- the XML representation as StringBuffer
NonParsableException
- if the ContinuousAlphabet
could not be reconstructed
out of the XML representation (the StringBuffer
could
not be parsed)Storable
public ContinuousAlphabet.ContinuousAlphabetParameterSet getCurrentParameterSet() throws Exception
InstantiableFromParameterSet
InstanceParameterSet
that has been used to
instantiate the current instance of the implementing class. If the
current instance was not created using an InstanceParameterSet
,
an equivalent InstanceParameterSet
should be returned, so that an
instance created using this InstanceParameterSet
would be in
principle equal to the current instance.getCurrentParameterSet
in interface InstantiableFromParameterSet
getCurrentParameterSet
in class Alphabet
InstanceParameterSet
Exception
- if the InstanceParameterSet
could not be returnedpublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.public int compareTo(Alphabet a)
public double getMin()
Alphabet
Alphabet
.public double getMax()
public final boolean isEncodedSymbol(double candidat)
candidat
is an element of the internal
interval.candidat
- the value to be testedtrue
if candidat
is an element of the
internal interval, false
otherwisepublic double length()
Alphabet
Alphabet
.